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
Martin Manchev
osie
Commits
83e0d618
Commit
83e0d618
authored
Jul 29, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add POC OPC-UA server.
parent
11e79dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+28
-0
No files found.
coupler/opc-ua-server/server.c
0 → 100644
View file @
83e0d618
/*
* POC OPC-UA server based on https://github.com/open62541
*/
#include <open62541/plugin/log_stdout.h>
#include <open62541/server.h>
#include <open62541/server_config_default.h>
#include <signal.h>
#include <stdlib.h>
static
volatile
UA_Boolean
running
=
true
;
static
void
stopHandler
(
int
sig
)
{
UA_LOG_INFO
(
UA_Log_Stdout
,
UA_LOGCATEGORY_USERLAND
,
"received ctrl-c"
);
running
=
false
;
}
int
main
(
void
)
{
signal
(
SIGINT
,
stopHandler
);
signal
(
SIGTERM
,
stopHandler
);
UA_Server
*
server
=
UA_Server_new
();
UA_ServerConfig_setDefault
(
UA_Server_getConfig
(
server
));
UA_StatusCode
retval
=
UA_Server_run
(
server
,
&
running
);
UA_Server_delete
(
server
);
return
retval
==
UA_STATUSCODE_GOOD
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
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