16 using namespace boost;
32 addOperation( log_mtd ).
doc(
"Log a message").arg(
"message",
"Message to log");
33 addEventPort(
"TimerIn", receiver);
40 shared_ptr<Scripting> scripting = getProvider<Scripting>(
"scripting");
43 Logger::In in(getName());
44 std::string machineName = this->getName();
45 if ( scripting->hasStateMachine(machineName))
47 if (scripting->activateStateMachine(machineName))
49 if (scripting->startStateMachine(machineName))
55 log(
Error) <<
"Unable to start state machine: " << machineName << endlog();
60 log(
Error) <<
"Unable to activate state machine: " << machineName << endlog();
65 log(
Error) <<
"Unable to find state machine: " << machineName << endlog();
72 Logger::In in(getName());
73 log(
Info) << message << endlog();
81 if ( Logger::log().getLogLevel() < Logger::Info ) {
82 Logger::log().setLogLevel( Logger::Info );
84 <<
" manually raises LogLevel to 'Info' (5). See also file 'orocos.log'."<<endlog();
101 std::string name =
"testWithStateMachine.osd";
105 log(
Error) <<
"Unable to load state machine: '" << name <<
"'" << endlog();
void loop()
Call this method from ORO_main() to process keyboard input and thus startup the TaskBrowser.
Operation< Signature > & doc(const std::string &description)
This component allows a text client to browse the peers of a peer RTT::TaskContext and execute comman...
int ORO_main(int argc, char **argv)
RTT::Operation< void(std::string)> log_mtd
void doLog(std::string message)
bool setActivity(base::ActivityInterface *new_act)
DataFlowInterface * ports()
base::PortInterface * getPort(const std::string &name) const
OperationCaller< bool(const std::string &)> loadStateMachines
A Component interface to the Real-Time types::Toolkit's timer. It must be configured with a Activity ...
InputPort< os::Timer::TimerId > receiver
boost::shared_ptr< StateMachine > StateMachinePtr
TestStateMachine(std::string name)
This component can be used to display messages on the standard output.
virtual bool connectTo(PortInterface *other, ConnPolicy const &policy)=0
virtual bool addPeer(TaskContext *peer, std::string alias="")
base::ActivityInterface * getActivity()
boost::shared_ptr< ServiceType > getProvider(const std::string &name)