rtprint_comp.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 # -*- coding: utf-8 -*-
00004 
00005 '''rtshell
00006 
00007 Copyright (C) 2009-2014
00008     Geoffrey Biggs
00009     RT-Synthesis Research Group
00010     Intelligent Systems Research Institute,
00011     National Institute of Advanced Industrial Science and Technology (AIST),
00012     Japan
00013     All rights reserved.
00014 Licensed under the Eclipse Public License -v 1.0 (EPL)
00015 http://www.opensource.org/licenses/eclipse-1.0.txt
00016 
00017 Reader component used by rtprint
00018 
00019 '''
00020 
00021 
00022 import gen_comp
00023 import OpenRTM_aist
00024 import RTC
00025 
00026 
00027 ###############################################################################
00028 ## Reader component for rtprint
00029 
00030 class Reader(gen_comp.GenComp):
00031     def __init__(self, mgr, port_specs, *args, **kwargs):
00032         gen_comp.GenComp.__init__(self, mgr, port_specs, *args, **kwargs)
00033 
00034     def _behv(self, ec_id):
00035         execed = 0
00036         for p in self._ports.values():
00037             if p.port.isNew():
00038                 execed = 1
00039                 p.read()
00040                 print p.format()
00041         return RTC.RTC_OK, execed
00042 


rtshell
Author(s): Geoffrey Biggs
autogenerated on Fri Aug 28 2015 12:55:12