13 motor_spec = [
"implementation_id",
"Motor",
15 "description",
"Motor component",
17 "vendor",
"Noriaki Ando, AIST",
18 "category",
"example",
19 "activity_type",
"DataFlowComponent",
22 "lang_type",
"SCRIPT",
23 "conf.default.motor_id",
"0",
28 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
32 self.
_d_in = RTC.TimedFloat(RTC.Time(0,0),0)
34 self.
_d_out = RTC.TimedLong(RTC.Time(0,0),0)
47 self._configsets.update(
"default")
52 if self._inIn.isNew():
53 data = self._inIn.read()
54 print "Motor Received data: ", data.data
55 self._d_out.data = long(data.data *2)
64 manager.registerFactory(profile,
72 comp = manager.createComponent(
"Motor")
77 mgr = OpenRTM_aist.Manager.init(sys.argv)
78 mgr.setModuleInitProc(MyModuleInit)
82 if __name__ ==
"__main__":
def onExecute(self, ec_id)
def bindParameter(self, param_name, var, def_val, trans=None)
template <typename vartype>=""> bool bindParameter(const char* param_name, VarType& var...
The Properties class represents a persistent set of properties.
def __init__(self, manager)
def addOutPort(self, name, outport)
def addInPort(self, name, inport)
def MyModuleInit(manager)
DataFlowComponentBase class.