19 import AutoTest, AutoTest__POA
31 AutoTestIn_spec = [
"implementation_id",
"AutoTestIn",
32 "type_name",
"AutoTestIn",
33 "description",
"ModuleDescription",
35 "vendor",
"HarumiMiyamoto",
36 "category",
"example",
37 "activity_type",
"STATIC",
40 "lang_type",
"SCRIPT",
41 "exec_cxt.periodic.rate",
"1.0",
83 \brief ModuleDescription 89 \param manager Maneger Object 91 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
115 self._MyServicePort.registerProvider(
"myservice0",
"MyService", self.
_myservice0_var)
124 self.
_file=open(
'received-data',
'w')
130 self._myservice0_var.reset_message()
135 self.
_msg = self._myservice0_var.get_echo()
139 if self._InIn.isNew()
and self._SeqInIn.isNew()
and self.
_msg:
140 floatdata = self._InIn.read()
141 fdata =
"%.6f\n" % floatdata.data
142 print "fdata:", fdata
143 self._file.write(fdata)
145 seqfloatdata = self._SeqInIn.read()
147 t_sdata = tuple(d
for d
in seqfloatdata.data)
148 sdata =
"%.6f %.6f %.6f %.6f %.6f\n" % t_sdata
150 print "sdata: ", sdata
151 self._file.write(sdata)
153 self._file.write(self.
_msg)
165 manager.registerFactory(profile,
173 comp = manager.createComponent(
"AutoTestIn")
178 mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)
179 mgr.setModuleInitProc(MyModuleInit)
180 mgr.activateManager()
183 if __name__ ==
"__main__":
def onExecute(self, ec_id)
RT Conponent CORBA service/consumer Port.
def push_back(seq, elem)
Push the new element back to the CORBA sequence.
def onActivated(self, ec_id)
The Properties class represents a persistent set of properties.
def addInPort(self, name, inport)
def MyModuleInit(manager)
def AutoTestInInit(manager)
def __init__(self, manager)
DataFlowComponentBase class.
def onDeactivated(self, ec_id)