12 sensor_spec = [
"implementation_id",
"Sensor",
13 "type_name",
"Sensor",
14 "description",
"Sensor component",
16 "vendor",
"Noriaki Ando, AIST",
17 "category",
"example",
18 "activity_type",
"DataFlowComponent",
21 "lang_type",
"SCRIPT",
27 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
31 self.
_d_in = RTC.TimedLong(RTC.Time(0,0),0)
33 self.
_d_out = RTC.TimedFloat(RTC.Time(0,0),0)
46 if self.
_inIn.isNew():
47 data = self.
_inIn.read()
48 print "Sensor Received data: ", data.data
49 self.
_d_out.data = data.data *2
57 manager.registerFactory(profile,
65 comp = manager.createComponent(
"Sensor")
69 mgr = OpenRTM_aist.Manager.init(sys.argv)
70 mgr.setModuleInitProc(MyModuleInit)
74 if __name__ ==
"__main__":
def MyModuleInit(manager)
The Properties class represents a persistent set of properties.
def __init__(self, manager)
def onExecute(self, ec_id)
def addOutPort(self, name, outport)
def addInPort(self, name, inport)
DataFlowComponentBase class.