34 log(
Warning) <<
"in: void null_0" << endlog();
38 log(
Warning) <<
"in: std::string op_0" << endlog();
39 return "inside operation_0";
43 log(
Warning) <<
"in: bool op_1(std::string s) " << s << endlog();
47 double op_2(std::string s,
double d) {
48 log(
Warning) <<
"in: double op_2(std::string s, double d) " << s << d << endlog();
53 log(
Warning) <<
"in: void op_1_out(int &i) " << i << endlog();
58 void op_3_out(std::string &s,
double &d,
int &i) {
59 log(
Warning) <<
"in: void op_3_out(std::string &s, double &d, int &i) " << s << d << i << endlog();
60 s = s +
"-this-string-has-a-tail";
67 log(
Warning) <<
"in: bool op_1_out_retval(int &i) " << i << endlog();
74 throw std::runtime_error(
"Alas, its time to go.");
98 property(
"the_property",
"the_property Description",
"Hello World"),
99 attribute(
"Hello World"),
100 constant(
"Hello World"),
102 outport(
"the_results",true),
109 this->setActivity(
new Activity(0, 0.01) );
112 assert( property.
ready() );
115 this->properties()->addProperty( property);
117 this->addAttribute(
"the_attribute", attribute);
118 this->addConstant(
"the_constant", constant);
120 this->ports()->addPort( outport ).doc(
"dummy test port");
121 this->ports()->addPort( bufferport );
123 this->addOperation(
"null_0", &Testcomp::null_0,
this,
OwnThread ).doc(
"'null_0' Description");
124 this->addOperation(
"op_0_ct", &Testcomp::op_0,
this,
ClientThread ).doc(
"'op_0_ct', ClientThread variant");
125 this->addOperation(
"op_0_ot", &Testcomp::op_0,
this,
ClientThread ).doc(
"'op_0_ot', OwnThread variant");
126 this->addOperation(
"op_1", &Testcomp::op_1,
this,
OwnThread).doc(
"'op_1' Description").arg(
"mes",
"just any string.");
127 this->addOperation(
"op_2", &Testcomp::op_2,
this,
OwnThread).doc(
"'op_2' Description").arg(
"mes",
"just any string.").arg(
"double",
"just any double");
128 this->addOperation(
"op_1_out", &Testcomp::op_1_out,
this,
OwnThread).doc(
"'op_1_out' Description").arg(
"i",
"any int");
129 this->addOperation(
"op_3_out", &Testcomp::op_3_out,
this,
OwnThread).doc(
"'op_3_out' Description").arg(
"mes",
"just any string.").arg(
"double",
"just any double").arg(
"i",
"just any int");
130 this->addOperation(
"op_1_out_retval", &Testcomp::op_1_out_retval,
this,
OwnThread).doc(
"'op_1_out' Description").arg(
"i",
"any int");
132 this->addOperation(
"op1_uint8", &Testcomp::op1_uint8,
this,
OwnThread).doc(
"'op1_uint8' Description").arg(
"x",
"any char, try 'x'");
134 this->addOperation(
"throw", &Testcomp::throw_exception,
this,
ClientThread).doc(
"This operation throws an exception");
135 this->provides(
"printing")
136 ->addOperation(
"print", &Testcomp::op_1,
137 this,
OwnThread).doc(
"'op_1' Description").arg(
"mes",
"just any string.");
139 this->requires(
"print_str")->addOperationCaller(print);
142 log(
Info) <<
"**** Starting the 'Testcomp' component ****" <<endlog();
RTT::Property< std::string > property
RTT::InputPort< std::string > bufferport
OperationCaller< bool(std::string)> print
void op_3_out(std::string &s, double &d, int &i)
bool op_1_out_retval(int &i)
Testcomp(std::string name)
RTT::OutputPort< std::string > outport
ORO_CREATE_COMPONENT(OCL::logging::Log4cxxAppender)
bool op1_uint8(unsigned char x)
double op_2(std::string s, double d)