Send countdown messages from a port (paired with os/view_count.cpp example).
Send countdown messages from a port (paired with os/view_count.cpp example).
#include <cstdio>
constexpr double loop_delay = 1.0;
int main(int argc, char* argv[])
{
if (argc != 2) {
return 1;
}
BufferedPort<Bottle> out;
out.open(argv[1]);
for (int i = 10; i >= 0; i--) {
printf("at %d\n", i);
Bottle& msg = out.prepare();
msg.clear();
msg.addString("countdown");
msg.addInt32(i);
out.write();
}
return 0;
}
A simple collection of objects that can be described and transmitted in a portable way.
A mini-server for performing network communication in the background.
Utilities for manipulating the YARP network, including initialization and shutdown.
void delay(double seconds)
Wait for a certain number of seconds.
The main, catch-all namespace for YARP.