Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
osie
Commits
25fce131
Commit
25fce131
authored
Feb 16, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups.
parent
7c49d252
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
coupler/cli.h
coupler/cli.h
+20
-18
coupler/server.c
coupler/server.c
+0
-4
No files found.
coupler/cli.h
View file @
25fce131
...
@@ -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
}
};
};
...
...
coupler/server.c
View file @
25fce131
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment