test_OutPortProvider.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # \file test_OutPortProvider.py
6 # \brief test for OutPortProvider class
7 # \date $Date: 2007/09/05$
8 # \author Shinji Kurihara
9 #
10 # Copyright (C) 2006
11 # Noriaki Ando
12 # Task-intelligence Research Group,
13 # Intelligent Systems Research Institute,
14 # National Institute of
15 # Advanced Industrial Science and Technology (AIST), Japan
16 # All rights reserved.
17 #
18 
19 import sys
20 sys.path.insert(1,"../")
21 
22 import unittest
23 
24 from OutPortProvider import *
25 import OpenRTM_aist
26 
27 
28 class TestOutPortProvider(unittest.TestCase):
29  def setUp(self):
31  return
32 
33  def tearDown(self):
34  OpenRTM_aist.Manager.instance().shutdownManager()
35  return
36 
38  properties = []
39  self._opp.setInterfaceType("corba_cdr")
40  self._opp.publishInterfaceProfile(properties)
41  self.assertEqual("corba_cdr",
42  OpenRTM_aist.NVUtil.toString(properties,"dataport.interface_type"))
43  return
44 
46  properties = []
47  self._opp.setInterfaceType("corba_cdr")
49  OpenRTM_aist.NVUtil.newNV("dataport.interface_type",
50  "corba_cdr"))
51 
53  OpenRTM_aist.NVUtil.newNV("dataport.dataflow_type",
54  "push"))
55 
57  OpenRTM_aist.NVUtil.newNV("dataport.subscription_type",
58  "flush"))
59  self.assertEqual(self._opp.publishInterface(properties),True)
60  return
61 
62  def test_setPortType(self):
63  self._opp.setPortType("out")
64  return
65 
66  def test_setDataType(self):
67  self._opp.setDataType("TimedLong")
68  return
69 
71  self._opp.setInterfaceType("corba_cdr")
72  return
73 
75  self._opp.setDataFlowType("flow")
76  return
77 
79  self._opp.setSubscriptionType("flush")
80 
81 
82 
83 if __name__ == '__main__':
84  unittest.main()
def push_back(seq, elem)
Push the new element back to the CORBA sequence.
def toString(nv, name=None)
Get string value in NVList specified by name.
Definition: NVUtil.py:311
def newNV(name, value)
Create NameVale.
Definition: NVUtil.py:50


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:07