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
1
Merge Requests
1
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
nexedi
osie
Commits
1f2c1a59
Commit
1f2c1a59
authored
Apr 25, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better defaults handling.
parent
acd16fc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
coupler/opc-ua-server/keep_alive.h
coupler/opc-ua-server/keep_alive.h
+2
-1
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+3
-2
No files found.
coupler/opc-ua-server/keep_alive.h
View file @
1f2c1a59
...
...
@@ -6,7 +6,8 @@ Keep alive implementation for couplers based on OPC UA's pub/sub mechanism
static
unsigned
int
HEART_BEATS
=
0
;
// the heart beat interval$
static
int
HEART_BEAT_INTERVAL
=
250
;
const
int
DEFAULT_HEART_BEAT_INTERVAL
=
250
;
static
int
HEART_BEAT_INTERVAL
=
DEFAULT_HEART_BEAT_INTERVAL
;
// the list of couplers onto which we depend for properly running
static
char
*
HEART_BEAT_ID_LIST
[
20
];
...
...
coupler/opc-ua-server/server.c
View file @
1f2c1a59
...
...
@@ -120,7 +120,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
arguments
->
heart_beat
=
atoi
(
arg
);
break
;
case
't'
:
arguments
->
heart_beat_interval
=
a
toi
(
arg
)
;
arguments
->
heart_beat_interval
=
a
rg
?
atoi
(
arg
)
:
DEFAULT_HEART_BEAT_INTERVAL
;
break
;
case
'l'
:
arguments
->
heart_beat_id_list
=
arg
;
...
...
@@ -161,7 +161,8 @@ int main(int argc, char **argv)
arguments
.
password
=
""
;
arguments
.
key
=
""
;
arguments
.
certificate
=
""
;
arguments
.
id
=
0
;
arguments
.
id
=
DEFAULT_ID
;
arguments
.
heart_beat_interval
=
DEFAULT_HEART_BEAT_INTERVAL
;
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
arguments
);
printf
(
"Mode=%d
\n
"
,
arguments
.
mode
);
...
...
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