-
Notifications
You must be signed in to change notification settings - Fork 12
/
main.cpp
40 lines (33 loc) · 985 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <yarp/os/LogStream.h>
#include <yarp/os/ResourceFinder.h>
#include <yarp/os/Network.h>
#include "StreamingDeviceController.hpp"
/**
* @ingroup kinematics-dynamics-programs
*
* \defgroup streamingDeviceController streamingDeviceController
*
* @brief Creates an instance of roboticslab::StreamingDeviceController.
*/
int main(int argc, char *argv[])
{
yarp::os::ResourceFinder rf;
rf.setDefaultContext("streamingDeviceController");
rf.setDefaultConfigFile("streamingDeviceController.ini");
rf.configure(argc, argv);
roboticslab::StreamingDeviceController mod;
yInfo() << "streamingDeviceController checking for yarp network...";
if (!yarp::os::Network::checkNetwork())
{
yError() << "streamingDeviceController found no yarp network (try running \"yarpserver &\"), bye!";
return 1;
}
if (mod.configure(rf))
{
return mod.runModule();
}
else
{
return mod.close() ? 0 : 1;
}
}