11 consoleout_spec = [
"implementation_id",
"ConsoleOut",
12 "type_name",
"ConsoleOut",
13 "description",
"Console output component",
15 "vendor",
"Shinji Kurihara",
16 "category",
"example",
17 "activity_type",
"DataFlowComponent",
20 "lang_type",
"script",
29 print "dtor of ", self.
_name 32 data = OpenRTM_aist.ConnectorDataListenerT.__call__(self, info, cdrdata, RTC.TimedLong(RTC.Time(0,0),0))
33 print "------------------------------" 34 print "Listener: ", self.
_name 35 print "Profile::name: ", info.name
36 print "Profile::id: ", info.id
37 print "Data: ", data.data
38 print "------------------------------" 46 print "dtor of ", self.
_name 49 print "------------------------------" 50 print "Listener: ", self.
_name 51 print "Profile::name: ", info.name
52 print "Profile::id: ", info.id
53 print "------------------------------" 59 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
63 self.
_data = RTC.TimedLong(RTC.Time(0,0),0)
68 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE,
72 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_FULL,
75 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT,
78 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_OVERWRITE,
81 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_READ,
84 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_SEND,
87 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVED,
90 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_FULL,
93 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_TIMEOUT,
96 self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_ERROR,
99 self._inport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_CONNECT,
101 self._inport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_DISCONNECT,
108 if self._inport.isNew():
109 data = self._inport.read()
110 print "Received: ", data
111 print "Received: ", data.data
112 print "TimeStamp: ", data.tm.sec,
"[s] ", data.tm.nsec,
"[ns]" 119 manager.registerFactory(profile,
127 comp = manager.createComponent(
"ConsoleOut")
132 mgr = OpenRTM_aist.Manager.init(sys.argv)
136 mgr.setModuleInitProc(MyModuleInit)
139 mgr.activateManager()
148 if __name__ ==
"__main__":
def MyModuleInit(manager)
def ConsoleOutInit(manager)
The Properties class represents a persistent set of properties.
This class is abstract base class for listener classes that provides callbacks for various events in ...
def __init__(self, manager)
def onExecute(self, ec_id)
def __call__(self, info, cdrdata)
def addInPort(self, name, inport)
DataFlowComponentBase class.
This class is abstract base class for listener classes that provides callbacks for various events in ...