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
9d0283a5
Commit
9d0283a5
authored
Apr 18, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UUID -> ID (less bytes to transfer).
parent
5ae38787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+7
-6
No files found.
coupler/opc-ua-server/server.c
View file @
9d0283a5
...
@@ -55,7 +55,7 @@ static struct argp_option options[] = {
...
@@ -55,7 +55,7 @@ static struct argp_option options[] = {
{
"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."
},
{
"
uuid"
,
'i'
,
""
,
0
,
"UUID of coupler
"
},
{
"
id"
,
'i'
,
""
,
0
,
"ID of coupler.
"
},
{
0
}
{
0
}
};
};
...
@@ -69,7 +69,7 @@ struct arguments
...
@@ -69,7 +69,7 @@ struct arguments
char
*
password
;
char
*
password
;
char
*
key
;
char
*
key
;
char
*
certificate
;
char
*
certificate
;
char
*
uu
id
;
char
*
id
;
};
};
static
error_t
parse_opt
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
static
error_t
parse_opt
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
...
@@ -101,7 +101,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
...
@@ -101,7 +101,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
arguments
->
key
=
arg
;
arguments
->
key
=
arg
;
break
;
break
;
case
'i'
:
case
'i'
:
arguments
->
uu
id
=
arg
;
arguments
->
id
=
arg
;
break
;
break
;
case
ARGP_KEY_ARG
:
case
ARGP_KEY_ARG
:
return
0
;
return
0
;
...
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
...
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
arguments
.
password
=
""
;
arguments
.
password
=
""
;
arguments
.
key
=
""
;
arguments
.
key
=
""
;
arguments
.
certificate
=
""
;
arguments
.
certificate
=
""
;
arguments
.
uu
id
=
""
;
arguments
.
id
=
""
;
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
arguments
);
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
arguments
);
printf
(
"Mode=%d
\n
"
,
arguments
.
mode
);
printf
(
"Mode=%d
\n
"
,
arguments
.
mode
);
...
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
...
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
printf
(
"Slave address list=%s
\n
"
,
arguments
.
slave_address_list
);
printf
(
"Slave address list=%s
\n
"
,
arguments
.
slave_address_list
);
printf
(
"Key=%s
\n
"
,
arguments
.
key
);
printf
(
"Key=%s
\n
"
,
arguments
.
key
);
printf
(
"Certificate=%s
\n
"
,
arguments
.
certificate
);
printf
(
"Certificate=%s
\n
"
,
arguments
.
certificate
);
printf
(
"
UUID=%s
\n
"
,
arguments
.
uu
id
);
printf
(
"
ID=%s
\n
"
,
arguments
.
id
);
// transfer to global variables (CLI input)
// transfer to global variables (CLI input)
...
@@ -229,6 +229,7 @@ int main(int argc, char **argv)
...
@@ -229,6 +229,7 @@ int main(int argc, char **argv)
// enable keep-alive
// enable keep-alive
UA_Int64
defaultInt64
=
0
;
UA_Int64
defaultInt64
=
0
;
UA_Int64
couplerID
=
atoi
(
arguments
.
id
);
const
PublishedVariable
publishedVariableArray
[]
=
{
const
PublishedVariable
publishedVariableArray
[]
=
{
// representing time in millis since start of process
// representing time in millis since start of process
{
{
...
@@ -241,7 +242,7 @@ int main(int argc, char **argv)
...
@@ -241,7 +242,7 @@ int main(int argc, char **argv)
{
{
.
name
=
"id"
,
.
name
=
"id"
,
.
description
=
"ID"
,
.
description
=
"ID"
,
.
pdefaultValue
=
&
defaultInt64
,
.
pdefaultValue
=
&
couplerID
,
.
type
=
UA_TYPES
[
UA_TYPES_INT64
]
.
type
=
UA_TYPES
[
UA_TYPES_INT64
]
}
}
};
};
...
...
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