Commit d5f6bd1c authored by Claes Sjofors's avatar Claes Sjofors

Powerlink servers, added option -m to show methods

parent 74b52cc4
......@@ -66,7 +66,16 @@ pwr_tStatus io_get_plhandler_object (
}
int main()
static void usage()
{
printf( "\
rt_powerlink I/O Powerlink Managing node server\n\
\n\
-m Print loaded I/O methods\n\
\n");
}
int main (int argc, char **argv)
{
pwr_tStatus sts;
io_tCtx io_ctx;
......@@ -77,6 +86,16 @@ int main()
struct timespec tim1, tim2;
if ( argc > 1) {
if ( strcmp( argv[1], "-m") == 0) {
io_methods_print();
exit(0);
}
if ( strcmp( argv[1], "-h") == 0) {
usage();
exit(0);
}
}
// Make connection to error handler
errh_Init("pwr_powerlink", errh_eAnix_powerlink);
......
......@@ -73,8 +73,16 @@ pwr_tStatus io_get_plhandler_object (
return IO__SUCCESS;
}
static void usage()
{
printf( "\
rt_powerlink_cn I/O Powerlink Controlled node server\n\
\n\
-m Print loaded I/O methods\n\
\n");
}
int main()
int main (int argc, char **argv)
{
pwr_tStatus sts;
io_tCtx io_ctx;
......@@ -85,6 +93,16 @@ int main()
struct timespec tim1, tim2;
if ( argc > 1) {
if ( strcmp( argv[1], "-m") == 0) {
io_methods_print();
exit(0);
}
if ( strcmp( argv[1], "-h") == 0) {
usage();
exit(0);
}
}
// Make connection to error handler
errh_Init("pwr_powerlink", errh_eAnix_powerlink);
......@@ -137,9 +155,10 @@ int main()
#include <stdio.h>
int main()
int main (int argc, char **argv)
{
printf("** Not built with Powerlink\n");
return 0;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment