test_InPortCorbaProvider.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 
00005 #
00006 #  \file  InPortCorbaProvider.py
00007 #  \brief InPortCorbaProvider class
00008 #  \date  $Date: 2007/09/25 $
00009 #  \author Shinji Kurihara
00010 # 
00011 #  Copyright (C) 2006
00012 #      Noriaki Ando
00013 #      Task-intelligence Research Group,
00014 #      Intelligent Systems Research Institute,
00015 #      National Institute of
00016 #          Advanced Industrial Science and Technology (AIST), Japan
00017 #      All rights reserved.
00018  
00019 import sys
00020 sys.path.insert(1,"../")
00021 
00022 import unittest
00023 
00024 from InPortCorbaProvider import *
00025  
00026 from omniORB import CORBA
00027 import RTC, RTC__POA
00028 import SDOPackage,SDOPackage__POA
00029 from omniORB import any
00030 
00031 import OpenRTM_aist
00032 
00033 
00034 class TestInPortCorbaProvider(unittest.TestCase):
00035         def setUp(self):
00036                 self.orb = CORBA.ORB_init()
00037                 self.poa = self.orb.resolve_initial_references("RootPOA")
00038                 poaManager = self.poa._get_the_POAManager()
00039                 poaManager.activate()
00040 
00041                 ringbuf = OpenRTM_aist.RingBuffer(8)
00042                 ringbuf.init(RTC.TimedLong(RTC.Time(0,0), 0))
00043                 self._ipcp = InPortCorbaProvider(OpenRTM_aist.InPort("in",
00044                                                                                                                  RTC.TimedLong(RTC.Time(0,0), 0),
00045                                                                                                                  ringbuf))
00046 
00047         def test_publishInterface(self):
00048                 prop = [SDOPackage.NameValue("dataport.interface_type", "CORBA_Any")]
00049                 self._ipcp.publishInterface(prop)
00050 
00051 
00052         def test_put(self):
00053                 data = any.to_any(RTC.TimedLong(RTC.Time(0,0),123))
00054                 self._ipcp.put(data)
00055 
00056 
00057 ############### test #################
00058 if __name__ == '__main__':
00059         unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28