Commit 25fce131 authored by Ivan Tyagov's avatar Ivan Tyagov

Cleanups.

parent 7c49d252
...@@ -6,24 +6,26 @@ const char *argp_program_bug_address = "info@nexedi.com"; ...@@ -6,24 +6,26 @@ const char *argp_program_bug_address = "info@nexedi.com";
static char doc[] = "OPC-UA server which controls MOD-IO's relays' state over OPC-UA protocol."; static char doc[] = "OPC-UA server which controls MOD-IO's relays' state over OPC-UA protocol.";
static char args_doc[] = "..."; static char args_doc[] = "...";
static struct argp_option options[] = { static struct argp_option options[] = {
{"port", 'p', "4840", 0, "Port to bind to."}, {"port", 'p', "4840", 0, "Port to bind to."},
{"server-ip-address", 'a', "", 0, "[not yet available] Server address to bind to."}, {"server-ip-address", 'a', "", 0, "[not yet available] Server address to bind to."},
{"device", 'd', "/dev/i2c-1", 0, "Linux block device path."}, {"device", 'd', "/dev/i2c-1", 0, "Linux block device path."},
{"slave-address-list", 's', "0x58", 0, "Comma separated list of slave I2C addresses."}, {"slave-address-list", 's', "0x58", 0, "Comma separated list of slave I2C addresses."},
{"mode", 'm', "0", 0, "Set different modes of operation of coupler. Default (0) is set attached \ {"mode", 'm', "0", 0, "Set different modes of operation of coupler. Default (0) is set attached \
I2C's state state. Virtual (1) which does NOT set any I2C slaves' state."}, I2C's state state. Virtual (1) which does NOT set any I2C slaves' state."},
{"username", 'u', "", 0, "Username."}, {"username", 'u', "", 0, "Username."},
{"password", 'w', "", 0, "Password."}, {"password", 'w', "", 0, "Password."},
{"key", 'k', "", 0, "x509 key."}, {"key", 'k', "", 0, "x509 key."},
{"certificate", 'c', "", 0, "X509 certificate."}, {"certificate", 'c', "", 0, "X509 certificate."},
{"id", 'i', "0", 0, "ID of coupler."}, {"id", 'i', "0", 0, "ID of coupler."},
{"heart-beat", 'b', "0", 0, "Publish heart beat to other couplers."}, {"heart-beat", 'b', "0", 0, "Publish heart beat to other couplers."},
{"heart-beat-interval", 't', "500", 0, "Heart beat interval in ms."}, {"heart-beat-interval", 't', "500", 0, "Heart beat interval in ms."},
{"heart-beat-timeout-interval", 'o', "2000", 0, "Heart beat timeout interval in ms."}, {"heart-beat-timeout-interval",
{"heart-beat-id-list", 'l', "", 0, "Comma separated list of IDs of couplers to watch for heart beats. \ 'o', "2000", 0, "Heart beat timeout interval in ms."},
If a heart beat is missing coupler goes to safe mode."}, {"heart-beat-id-list", 'l', "", 0, "Comma separated list of IDs of couplers to watch for heart beats. \
{"network-address-url-data-type", 'n', "opc.udp://224.0.0.22:4840/", 0, "Network address URL type used for Pub/Sub."}, If a heart beat is missing coupler goes to safe mode."},
{"network-interface", 'j', "", 0, "Network interface to use for Pub/Sub."}, {"network-address-url-data-type",
'n', "opc.udp://224.0.0.22:4840/", 0, "Network address URL type used for Pub/Sub."},
{"network-interface", 'j', "", 0, "Network interface to use for Pub/Sub."},
{0} {0}
}; };
......
...@@ -6,10 +6,6 @@ ...@@ -6,10 +6,6 @@
* - i2c0.relay0..3 * - i2c0.relay0..3
* - i2c0.in0..3 * - i2c0.in0..3
* - i2c0.ain0..3 * - i2c0.ain0..3
* Based on
* https://www.kernel.org/doc/Documentation/i2c/dev-interface
* https://github.com/open62541/open62541/blob/master/examples/tutorial_server_variable.c
* https://stackoverflow.com/questions/9642732/parsing-command-line-arguments-in-c
*/ */
#include <stdio.h> #include <stdio.h>
......
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