13 seqout_spec = [
"implementation_id",
"SeqOut",
14 "type_name",
"SequenceOutComponent",
15 "description",
"Sequence OutPort component",
17 "vendor",
"Shinji Kurihara",
18 "category",
"example",
19 "activity_type",
"DataFlowComponent",
22 "lang_type",
"script",
29 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
33 self.
_octet = RTC.TimedOctet(RTC.Time(0,0),0)
34 self.
_short = RTC.TimedShort(RTC.Time(0,0),0)
35 self.
_long = RTC.TimedLong(RTC.Time(0,0),0)
36 self.
_float = RTC.TimedFloat(RTC.Time(0,0),0)
37 self.
_double = RTC.TimedDouble(RTC.Time(0,0),0)
38 self.
_octetSeq = RTC.TimedOctetSeq(RTC.Time(0,0),[])
39 self.
_shortSeq = RTC.TimedShortSeq(RTC.Time(0,0),[])
40 self.
_longSeq = RTC.TimedLongSeq(RTC.Time(0,0),[])
41 self.
_floatSeq = RTC.TimedFloatSeq(RTC.Time(0,0),[])
78 self.
_octet.data = int(random.uniform(0x41, 0x4a))
79 self.
_short.data = int(random.uniform(0, 10))
80 self.
_long.data = long(random.uniform(0, 10))
81 self.
_float.data = float(random.uniform(0.0, 10.0))
82 self.
_double.data = float(random.uniform(0.0, 10.0))
84 print '%3.2s %10.8s %10.8s %10.8s %10.8s %10.8s' \
85 % (
' ',
'octet',
'short',
'long',
'float',
'double')
86 print '%3.2s %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
88 print "-------------------------------------------------------------" 89 print " Sequence Data " 90 print "-------------------------------------------------------------" 92 octetSeq = octetSeq + chr(int(random.uniform(0x41, 0x4a)))
93 shortSeq.append(int(random.uniform(0, 10)))
94 longSeq.append(long(random.uniform(0, 10)))
95 floatSeq.append(float(random.uniform(0.0, 10.0)))
96 doubleSeq.append(float(random.uniform(0.0, 10.0)))
97 print '%3.2s : %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
98 % (str(i), ord(octetSeq[i]), octetSeq[i], shortSeq[i], longSeq[i], floatSeq[i], doubleSeq[i])
101 print "[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r" 127 manager.registerFactory(profile,
137 comp = manager.createComponent(
"SeqOut")
139 print "Component created" 144 mgr = OpenRTM_aist.Manager.init(sys.argv)
148 mgr.setModuleInitProc(MyModuleInit)
151 mgr.activateManager()
160 if __name__ ==
"__main__":
The Properties class represents a persistent set of properties.
def addOutPort(self, name, outport)
def __init__(self, manager)
def onExecute(self, ec_id)
DataFlowComponentBase class.
def MyModuleInit(manager)