20 "implementation_id",
"SeqOut",
21 "type_name",
"SequenceOutComponent",
22 "description",
"Sequence OutPort component",
24 "vendor",
"Noriaki Ando, AIST",
25 "category",
"example",
26 "activity_type",
"DataFlowComponent",
29 "lang_type",
"compile",
31 "conf.default.data_type",
"serial",
32 "conf.mode0.data_type",
"random",
40 m_OctetOut(
"Octet", m_Octet),
41 m_ShortOut(
"Short", m_Short),
42 m_LongOut(
"Long", m_Long),
43 m_FloatOut(
"Float", m_Float),
44 m_DoubleOut(
"Double", m_Double),
45 m_OctetSeqOut(
"OctetSeq", m_OctetSeq),
46 m_ShortSeqOut(
"ShortSeq", m_ShortSeq),
47 m_LongSeqOut(
"LongSeq", m_LongSeq),
48 m_FloatSeqOut(
"FloatSeq", m_FloatSeq),
49 m_DoubleSeqOut(
"DoubleSeq", m_DoubleSeq)
176 static unsigned char cnt0, cntseq0;
177 static short cnt1, cntseq1;
178 static long cnt2, cntseq2;
179 static float cnt3, cntseq3;
180 static double cnt4, cntseq4;
231 std::cout <<
m_Float.data <<
" ";
232 std::cout <<
m_Long.data <<
" ";
233 std::cout <<
m_Short.data <<
" ";
234 std::cout << int(
m_Octet.data) <<
"[";
237 std::cout <<
" " <<
"]";
241 std::cout <<
m_Octet.data <<
"]";
243 std::cout <<
" " << std::endl << std::endl;
245 for (CORBA::ULong i = 0; i < 10; ++i)
258 if( cntseq1 > 30000 )
265 if( cntseq2 > 30000 )
272 if( cntseq3 > 30000 )
279 if( cntseq4 > 30000 )
288 m_FloatSeq.data[i] =
static_cast<float>(rand());
289 m_LongSeq.data[i] =
static_cast<long>(rand());
290 m_ShortSeq.data[i] =
static_cast<short>(rand());
291 m_OctetSeq.data[i] =
static_cast<unsigned char>(rand());
294 std::cout << i <<
": ";
302 std::cout <<
" " <<
"]";
308 std::cout <<
" " << std::endl;
313 std::cout << std::endl <<
"write data type : serial" << std::endl;
317 std::cout << std::endl <<
"write data type : random" << std::endl;
323 std::cout <<
"[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";
397 RTC::Delete<SeqOut>);
OutPort< TimedFloat > m_FloatOut
OutPort< TimedDouble > m_DoubleOut
void addConnectorDataListener(ConnectorDataListenerType listener_type, ConnectorDataListener *listener, bool autoclean=true)
Adding BufferDataListener type listener.
void addConnectorListener(ConnectorListenerType callback_type, ConnectorListener *listener, bool autoclean=true)
Adding ConnectorListener type listener.
OutPort< TimedFloatSeq > m_FloatSeqOut
DataFlowComponentBase class.
static const char * seqout_spec[]
OutPort< TimedLong > m_LongOut
bool addOutPort(const char *name, OutPortBase &outport)
[local interface] Register DataOutPort
virtual RTC::ReturnCode_t onInitialize()
Callback function to initialize.
OutPort< TimedShortSeq > m_ShortSeqOut
ExecutionContextHandle_t UniqueId
OutPort< TimedLongSeq > m_LongSeqOut
void SeqOutInit(RTC::Manager *manager)
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
Setup for configuration parameters.
Sequence OutPort component.
OutPort< TimedShort > m_ShortOut
bool g_Listener_dump_enabled
TimedDoubleSeq m_DoubleSeq
SeqOut(RTC::Manager *manager)
Class represents a set of properties.
OutPort< TimedOctet > m_OctetOut
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Callback function to execute periodically.
virtual bool write(DataType &value)
Write data.
OutPort< TimedOctetSeq > m_OctetSeqOut
OutPort< TimedDoubleSeq > m_DoubleSeqOut
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
Register RT-Component Factory.
int usleep(useconds_t usec)
Stop a processing at specified micro second time.