108 std::list<MessageEntry>
m;
110 std::list<MessageEntry>::iterator
it;
111 for (
it =
m.begin();
it !=
m.end();
it++) {
112 printf(
" %s %d %s \n",
it->yarprun_timestamp.c_str(),
it->level.toInt(),
it->text.c_str());
118 std::list<MessageEntry>
m;
120 std::list<MessageEntry>::iterator
it;
121 for (
it =
m.begin();
it !=
m.end();
it++) {
122 printf(
" %s %d %s \n",
it->yarprun_timestamp.c_str(),
it->level.toInt(),
it->text.c_str());
128 std::list<std::string>
ports;
134 std::list<std::string>
ports;
141 std::list<LogEntryInfo>
infos;
143 std::list<LogEntryInfo>::iterator
it;
148 printf(
"%s %s hour:%d minute:%d sec:%d \n",
it->port_prefix.c_str(),
it->port_complete.c_str(),
tm->tm_hour,
tm->tm_min,
tm->tm_sec);
150 printf(
"%s %s no data received yet \n",
it->port_prefix.c_str(),
it->port_complete.c_str());
163int main(
int argc,
char *argv[])
166 if (!
yarp.checkNetwork())
bool respond(const yarp::os::Bottle &command, yarp::os::Bottle &reply) override
Respond to a message.
bool close() override
Close function.
bool configure(yarp::os::ResourceFinder &rf) override
Configure the module, pass a ResourceFinder object to the module.
bool interruptModule() override
Try to halt any ongoing operations by threads managed by the module.
bool updateModule() override
Override this to do whatever your module needs to do.
double getPeriod() override
You can override this to control the approximate periodicity at which updateModule() is called by run...
A simple collection of objects that can be described and transmitted in a portable way.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
void clear()
Empties the bottle of any objects it contains.
void addString(const char *str)
Places a string in the bottle, at the end of the list.
A mini-server for performing network communication in the background.
Utilities for manipulating the YARP network, including initialization and shutdown.
A mini-server for network communication.
void interrupt() override
Interrupt any current reads or writes attached to the port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base-class for standard YARP modules that supports ResourceFinder.
virtual bool attach(yarp::os::Port &source)
Make any input from a Port object go to the respond() method.
Helper class for finding config files and other external resources.
bool setDefaultContext(const std::string &contextName)
Sets the context for the current ResourceFinder object.
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
bool setDefaultConfigFile(const std::string &fname)
Provide a default value for the configuration file (can be overridden from command line with the –fro...
virtual std::string asString() const
Get string value.
void connect(const std::list< std::string > &ports)
void get_messages(std::list< MessageEntry > &messages)
void get_messages_by_process(std::string process, std::list< MessageEntry > &messages, bool from_beginning=false)
void discover(std::list< std::string > &ports)
bool load_all_logs_from_file(std::string filename)
int get_num_of_processes()
bool save_all_logs_to_file(std::string filename)
void get_infos(std::list< LogEntryInfo > &infos)
int main(int argc, char *argv[])
An interface to the operating system, including Port based communication.
The main, catch-all namespace for YARP.