17 "implementation_id",
"ConfigSample",
18 "type_name",
"ConfigSample",
19 "description",
"Configuration example component",
21 "vendor",
"Noriaki Ando, AIST",
22 "category",
"example",
23 "activity_type",
"DataFlowComponent",
26 "lang_type",
"compile",
28 "conf.default.int_param0",
"0",
29 "conf.default.int_param1",
"1",
30 "conf.default.double_param0",
"0.11",
31 "conf.default.double_param1",
"9.9",
32 "conf.default.str_param0",
"hoge",
33 "conf.default.str_param1",
"dara",
34 "conf.default.vector_param0",
"0.0,1.0,2.0,3.0,4.0",
43 const char* c =
"/-\\|";
90 std::cout << std::endl;
91 std::cout <<
"Please change configuration values from RtcLink" << std::endl;
92 std::cout << std::endl;
137 static int maxlen(0);
142 std::cout <<
"---------------------------------------" << std::endl;
143 std::cout <<
" Active Configuration Set: ";
145 std::cout <<
"---------------------------------------" << std::endl;
147 std::cout <<
"int_param0: " <<
m_int_param0 << c << std::endl;
148 std::cout <<
"int_param1: " <<
m_int_param1 << c << std::endl;
151 std::cout <<
"str_param0: " <<
m_str_param0 << c << std::endl;
152 std::cout <<
"str_param1: " <<
m_str_param1 << c << std::endl;
155 std::cout <<
"vector_param0[" << i <<
"]: ";
158 std::cout <<
"---------------------------------------" << std::endl;
161 maxlen = maxlen > curlen ? maxlen : curlen;
162 for (
int i(0), len(maxlen - curlen); i < len; ++i)
164 std::cout << c << c << std::endl;
167 std::cout <<
"Updating.... " <<
ticktack() << c << std::endl;
169 for (
int i(0), len(11 + maxlen); i < len; ++i)
230 RTC::Create<ConfigSample>,
231 RTC::Delete<ConfigSample>);
DataFlowComponentBase class.
Configuration example component.
virtual RTC::ReturnCode_t onInitialize()
Callback function to initialize.
static const char * configsample_spec[]
ExecutionContextHandle_t UniqueId
std::vector< double > m_vector_param0
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
Setup for configuration parameters.
ConfigSample(RTC::Manager *manager)
ConfigAdmin m_configsets
Configuration Administrator Object.
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Callback function to execute periodically.
void ConfigSampleInit(RTC::Manager *manager)
Class represents a set of properties.
const char * getActiveId(void)
Get ID of active configuration set.
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.