Exemplo n.º 1
0
    def onInitialize(self):
        self._indata1 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._indata2 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._indata3 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._outdata1 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._outdata2 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._outdata3 = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._cspmanager = OpenRTM_aist.CSPManager()
        self._inport1 = OpenRTM_aist.CSPInPort("in1", self._indata1,
                                               self._cspmanager)
        self._inport2 = OpenRTM_aist.CSPInPort("in2", self._indata2,
                                               self._cspmanager)
        self._inport3 = OpenRTM_aist.CSPInPort("in3", self._indata3,
                                               self._cspmanager)
        self._outport1 = OpenRTM_aist.CSPOutPort("out1", self._outdata1,
                                                 self._cspmanager)
        self._outport2 = OpenRTM_aist.CSPOutPort("out2", self._outdata2,
                                                 self._cspmanager)
        self._outport3 = OpenRTM_aist.CSPOutPort("out3", self._outdata3,
                                                 self._cspmanager)
        # Set InPort buffer
        self.addInPort("in1", self._inport1)
        self.addInPort("in2", self._inport2)
        self.addInPort("in3", self._inport3)
        self.addOutPort("out1", self._outport1)
        self.addOutPort("out2", self._outport2)
        self.addOutPort("out3", self._outport3)

        return RTC.RTC_OK
Exemplo n.º 2
0
    def onInitialize(self):
        self._data = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._inport = OpenRTM_aist.CSPInPort("in", self._data)
        # Set InPort buffer
        self.addInPort("in", self._inport)

        return RTC.RTC_OK