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._outport = OpenRTM_aist.CSPOutPort("out", self._data)
        # Set OutPort buffer
        self.addOutPort("out", self._outport)

        return RTC.RTC_OK
    def onInitialize(self):
        self._open = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._close = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._minute = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._start = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._stop = RTC.TimedLong(RTC.Time(0, 0), 0)
        self._tick = RTC.TimedLong(RTC.Time(0, 0), 0)

        self._openOut = OpenRTM_aist.CSPOutPort("open", self._open)
        self._closeOut = OpenRTM_aist.CSPOutPort("close", self._close)
        self._minuteOut = OpenRTM_aist.CSPOutPort("minute", self._minute)
        self._startOut = OpenRTM_aist.CSPOutPort("start", self._start)
        self._stopOut = OpenRTM_aist.CSPOutPort("stop", self._stop)
        self._tickOut = OpenRTM_aist.CSPOutPort("tick", self._tick)
        # Set OutPort buffer
        self.addOutPort("open", self._openOut)
        self.addOutPort("close", self._closeOut)
        self.addOutPort("minute", self._minuteOut)
        self.addOutPort("start", self._startOut)
        self.addOutPort("stop", self._stopOut)
        self.addOutPort("tick", self._tickOut)

        return RTC.RTC_OK