test_RTCUtil.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # @file test_RTCUtil.py
6 # @brief test for RTComponent utils
7 # @date $Date: 2007/09/11 $
8 # @author Shinji Kurihara
9 #
10 # Copyright (C) 2007
11 # Task-intelligence Research Group,
12 # Intelligent Systems Research Institute,
13 # National Institute of
14 # Advanced Industrial Science and Technology (AIST), Japan
15 # All rights reserved.
16 
17 
18 import sys
19 sys.path.insert(1,"../")
20 
21 import unittest
22 import OpenRTM_aist
23 import RTC, RTC__POA
24 
25 from RTCUtil import *
26 from omniORB import CORBA
27 
28 #class test(RTC__POA.DataFlowParticipant):
30  def __init__(self):
31  self.orb = CORBA.ORB_init()
32  self.poa = self.orb.resolve_initial_references("RootPOA")
33  OpenRTM_aist.RTObject_impl.__init__(self, orb=self.orb, poa=self.poa)
34  poaManager = self.poa._get_the_POAManager()
35  poaManager.activate()
36 
37 
38 class TestRTCUtil(unittest.TestCase):
39  def setUp(self):
40  pass
41 
42  def tearDown(self):
43  OpenRTM_aist.Manager.instance().shutdownManager()
44  return
45 
47  dfp_i = test()
48  dfp = dfp_i._this()
49  print isDataFlowComponent(dfp)
50 
52  dfp_i = test()
53  dfp = dfp_i._this()
54  print isFsmParticipant(dfp)
55 
56 
57  def test_isFsmObject(self):
58  dfp_i = test()
59  dfp = dfp_i._this()
60  print isFsmObject(dfp)
61 
62 
64  dfp_i = test()
65  dfp = dfp_i._this()
66  print isMultiModeObject(dfp)
67 
68 
69 
70 ############### test #################
71 if __name__ == '__main__':
72  unittest.main()
def isFsmParticipant(obj)
Definition: RTCUtil.py:66
def isDataFlowComponent(obj)
Definition: RTCUtil.py:42
def test_isDataFlowComponent(self)
Definition: test_RTCUtil.py:46
def isMultiModeObject(obj)
Definition: RTCUtil.py:112
def __init__(self)
Definition: test_RTCUtil.py:30
def test_isFsmParticipant(self)
Definition: test_RTCUtil.py:51
def test_isMultiModeObject(self)
Definition: test_RTCUtil.py:63
def isFsmObject(obj)
Definition: RTCUtil.py:89


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