Пример #1
0
    def setUp(self):
        self.orb = CORBA.ORB_init()
        self.poa = self.orb.resolve_initial_references("RootPOA")
        poaManager = self.poa._get_the_POAManager()
        poaManager.activate()

        ringbuf = OpenRTM_aist.RingBuffer(8)
        ringbuf.init(RTC.TimedLong(RTC.Time(0, 0), 0))
        self._ipcp = InPortCorbaProvider(
            OpenRTM_aist.InPort("in", RTC.TimedLong(RTC.Time(0, 0), 0),
                                ringbuf))
    def setUp(self):
        self.orb = CORBA.ORB_init()
        self.poa = self.orb.resolve_initial_references("RootPOA")
        poaManager = self.poa._get_the_POAManager()
        poaManager.activate()

        ringbuf = OpenRTM_aist.RingBuffer(8)
        ringbuf.init(RTC.TimedLong(RTC.Time(0, 0), 0))
        self._ipcp = InPortCorbaProvider(OpenRTM_aist.InPort("in", RTC.TimedLong(RTC.Time(0, 0), 0), ringbuf))
class TestInPortCorbaProvider(unittest.TestCase):
    def setUp(self):
        self.orb = CORBA.ORB_init()
        self.poa = self.orb.resolve_initial_references("RootPOA")
        poaManager = self.poa._get_the_POAManager()
        poaManager.activate()

        ringbuf = OpenRTM_aist.RingBuffer(8)
        ringbuf.init(RTC.TimedLong(RTC.Time(0, 0), 0))
        self._ipcp = InPortCorbaProvider(OpenRTM_aist.InPort("in", RTC.TimedLong(RTC.Time(0, 0), 0), ringbuf))

    def test_publishInterface(self):
        prop = [SDOPackage.NameValue("dataport.interface_type", "CORBA_Any")]
        self._ipcp.publishInterface(prop)

    def test_put(self):
        data = any.to_any(RTC.TimedLong(RTC.Time(0, 0), 123))
        self._ipcp.put(data)
Пример #4
0
class TestInPortCorbaProvider(unittest.TestCase):
    def setUp(self):
        self.orb = CORBA.ORB_init()
        self.poa = self.orb.resolve_initial_references("RootPOA")
        poaManager = self.poa._get_the_POAManager()
        poaManager.activate()

        ringbuf = OpenRTM_aist.RingBuffer(8)
        ringbuf.init(RTC.TimedLong(RTC.Time(0, 0), 0))
        self._ipcp = InPortCorbaProvider(
            OpenRTM_aist.InPort("in", RTC.TimedLong(RTC.Time(0, 0), 0),
                                ringbuf))

    def test_publishInterface(self):
        prop = [SDOPackage.NameValue("dataport.interface_type", "CORBA_Any")]
        self._ipcp.publishInterface(prop)

    def test_put(self):
        data = any.to_any(RTC.TimedLong(RTC.Time(0, 0), 123))
        self._ipcp.put(data)