10 #include <coil/Time.h> 19 "implementation_id",
"AutoTestOut",
20 "type_name",
"AutoTestOut",
21 "description",
"Sample component for auto-test",
24 "category",
"example",
25 "activity_type",
"PERIODIC",
26 "kind",
"DataFlowComponent",
29 "lang_type",
"compile",
30 "exec_cxt.periodic.rate",
"1.0",
42 m_outOut(
"out", m_out),
43 m_seqoutOut(
"seqout", m_seqout),
44 m_MyServicePort(
"MyService")
107 fin.open(
"original-data");
109 std::cout <<
"Can't open original-data..." << std::endl;
130 std::vector<std::string> vstr;
133 if (getline(
fin, ss)){
136 std::cout << std::fixed;
137 std::cout << std::showpoint;
138 std::cout << std::setprecision(6);
139 std::stringstream iss;
143 std::cout <<
m_out.data << std::endl;
147 if (getline(
fin, ss)){
148 std::cout << ss << std::endl;
151 std::stringstream isss;
153 for (
int len=0; len<5; ++len){
157 std::cout <<
"m_seqout.data[len] = " <<
m_seqout.data[len] << std::endl;
162 if (getline(
fin,ss)){
163 std::cout << ss << std::endl;
225 RTC::Create<AutoTestOut>,
226 RTC::Delete<AutoTestOut>);
#define RTC_ERROR(fmt)
Error log output macro.
AutoTestOut(RTC::Manager *manager)
constructor
DataFlowComponentBase class.
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
Callback function to activate.
vstring split(const std::string &input, const std::string &delimiter, bool ignore_empty)
Split string by delimiter.
void AutoTestOutInit(RTC::Manager *manager)
Sample component for auto-test.
bool addOutPort(const char *name, OutPortBase &outport)
[local interface] Register DataOutPort
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
Callback function to deactivate.
RTC::CorbaConsumer< AutoTest::MyService > m_myservice0
ExecutionContextHandle_t UniqueId
virtual RTC::ReturnCode_t onInitialize()
Callback function to initialize.
static const char * autotestout_spec[]
OutPort< TimedFloat > m_outOut
ObjectTypePtr _ptr()
Get Object reference narrowed as ObjectType.
Class represents a set of properties.
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Callback function to execute periodically.
OutPort< TimedFloatSeq > m_seqoutOut
RTC::CorbaPort m_MyServicePort
bool addPort(PortBase &port)
[local interface] Register Port
virtual bool write(DataType &value)
Write data.
bool registerConsumer(const char *instance_name, const char *type_name, CorbaConsumerBase &consumer)
Register the consumer.
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.