test_InPortCorbaProvider.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 
5 #
6 # \file InPortCorbaProvider.py
7 # \brief InPortCorbaProvider class
8 # \date $Date: 2007/09/25 $
9 # \author Shinji Kurihara
10 #
11 # Copyright (C) 2006
12 # Noriaki Ando
13 # Task-intelligence Research Group,
14 # Intelligent Systems Research Institute,
15 # National Institute of
16 # Advanced Industrial Science and Technology (AIST), Japan
17 # All rights reserved.
18 
19 import sys
20 sys.path.insert(1,"../")
21 
22 import unittest
23 
24 from InPortCorbaProvider import *
25 
26 from omniORB import CORBA
27 import RTC, RTC__POA
28 import SDOPackage,SDOPackage__POA
29 from omniORB import any
30 
31 import OpenRTM_aist
32 
33 
34 class TestInPortCorbaProvider(unittest.TestCase):
35  def setUp(self):
36  self.orb = CORBA.ORB_init()
37  self.poa = self.orb.resolve_initial_references("RootPOA")
38  poaManager = self.poa._get_the_POAManager()
39  poaManager.activate()
40 
41  ringbuf = OpenRTM_aist.RingBuffer(8)
42  ringbuf.init(RTC.TimedLong(RTC.Time(0,0), 0))
44  RTC.TimedLong(RTC.Time(0,0), 0),
45  ringbuf))
46 
48  prop = [SDOPackage.NameValue("dataport.interface_type", "CORBA_Any")]
49  self._ipcp.publishInterface(prop)
50 
51 
52  def test_put(self):
53  data = any.to_any(RTC.TimedLong(RTC.Time(0,0),123))
54  self._ipcp.put(data)
55 
56 
57 ############### test #################
58 if __name__ == '__main__':
59  unittest.main()
InPort template class.
Definition: InPort.py:58


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34