test_RTCUtil.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 #  @file test_RTCUtil.py
00006 #  @brief test for RTComponent utils
00007 #  @date $Date: 2007/09/11 $
00008 #  @author Shinji Kurihara
00009 # 
00010 #  Copyright (C) 2007
00011 #      Task-intelligence Research Group,
00012 #      Intelligent Systems Research Institute,
00013 #      National Institute of
00014 #          Advanced Industrial Science and Technology (AIST), Japan
00015 #      All rights reserved.
00016 
00017 
00018 import sys
00019 sys.path.insert(1,"../")
00020 
00021 import unittest
00022 import OpenRTM_aist
00023 import RTC, RTC__POA
00024 
00025 from RTCUtil import *
00026 from omniORB import CORBA
00027 
00028 #class test(RTC__POA.DataFlowParticipant):
00029 class test(OpenRTM_aist.RTObject_impl):
00030   def __init__(self):
00031     self.orb = CORBA.ORB_init()
00032     self.poa = self.orb.resolve_initial_references("RootPOA")
00033     OpenRTM_aist.RTObject_impl.__init__(self, orb=self.orb, poa=self.poa)
00034     poaManager = self.poa._get_the_POAManager()
00035     poaManager.activate()
00036 
00037   
00038 class TestRTCUtil(unittest.TestCase):
00039   def setUp(self):
00040     pass
00041 
00042   def tearDown(self):
00043     OpenRTM_aist.Manager.instance().shutdownManager()
00044     return
00045 
00046   def test_isDataFlowComponent(self):
00047     dfp_i = test()
00048     dfp = dfp_i._this()
00049     print isDataFlowComponent(dfp)
00050 
00051   def test_isFsmParticipant(self):
00052     dfp_i = test()
00053     dfp = dfp_i._this()
00054     print isFsmParticipant(dfp)
00055 
00056 
00057   def test_isFsmObject(self):
00058     dfp_i = test()
00059     dfp = dfp_i._this()
00060     print isFsmObject(dfp)
00061 
00062 
00063   def test_isMultiModeObject(self):
00064     dfp_i = test()
00065     dfp = dfp_i._this()
00066     print isMultiModeObject(dfp)
00067 
00068 
00069 
00070 ############### test #################
00071 if __name__ == '__main__':
00072         unittest.main()


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