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
10a953a7
Commit
10a953a7
authored
Jan 26, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assume that each heart beat requires a Publish event.
parent
e48fc6d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
coupler/opc-ua-server/cli.h
coupler/opc-ua-server/cli.h
+1
-0
coupler/opc-ua-server/keep_alive.h
coupler/opc-ua-server/keep_alive.h
+1
-1
coupler/opc-ua-server/keep_alive_subscriber.h
coupler/opc-ua-server/keep_alive_subscriber.h
+1
-1
No files found.
coupler/opc-ua-server/cli.h
View file @
10a953a7
...
@@ -149,6 +149,7 @@ void handleCLI(int argc, char **argv) {
...
@@ -149,6 +149,7 @@ void handleCLI(int argc, char **argv) {
I2C_VIRTUAL_MODE
=
arguments
.
mode
;
I2C_VIRTUAL_MODE
=
arguments
.
mode
;
I2C_BLOCK_DEVICE_NAME
=
arguments
.
device
;
I2C_BLOCK_DEVICE_NAME
=
arguments
.
device
;
HEART_BEAT_INTERVAL
=
arguments
.
heart_beat_interval
;
HEART_BEAT_INTERVAL
=
arguments
.
heart_beat_interval
;
PUBLISHING_INTERVAL
=
HEART_BEAT_INTERVAL
;
// we assume that each heart_beat leads to a publish event
HEART_BEAT_TIMEOUT_INTERVAL
=
arguments
.
heart_beat_timeout_interval
;
HEART_BEAT_TIMEOUT_INTERVAL
=
arguments
.
heart_beat_timeout_interval
;
NETWORK_ADDRESS_URL_DATA_TYPE
=
arguments
.
network_address_url_data_type
;
NETWORK_ADDRESS_URL_DATA_TYPE
=
arguments
.
network_address_url_data_type
;
USERNAME
=
arguments
.
username
;
USERNAME
=
arguments
.
username
;
...
...
coupler/opc-ua-server/keep_alive.h
View file @
10a953a7
...
@@ -27,7 +27,7 @@ static int HEART_BEAT_TIMEOUT_INTERVAL = DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL;
...
@@ -27,7 +27,7 @@ static int HEART_BEAT_TIMEOUT_INTERVAL = DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL;
unsigned
int
HEART_BEAT_ID_LIST
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
unsigned
int
HEART_BEAT_ID_LIST
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
// the interval for publishing messages$
// the interval for publishing messages$
const
int
PUBLISHING_INTERVAL
=
10
;
static
int
PUBLISHING_INTERVAL
=
10
;
// a hard coded writer group, data set and publisher ID$
// a hard coded writer group, data set and publisher ID$
// (should be same for publisher / subscriber)$
// (should be same for publisher / subscriber)$
...
...
coupler/opc-ua-server/keep_alive_subscriber.h
View file @
10a953a7
...
@@ -217,7 +217,7 @@ static UA_StatusCode addSubscribedVariables(UA_Server *server, UA_NodeId dataSet
...
@@ -217,7 +217,7 @@ static UA_StatusCode addSubscribedVariables(UA_Server *server, UA_NodeId dataSet
/*monitor variable*/
/*monitor variable*/
if
(
ENABLE_HEART_BEAT_CHECK
)
{
if
(
ENABLE_HEART_BEAT_CHECK
)
{
UA_MonitoredItemCreateRequest
monRequest
=
UA_MonitoredItemCreateRequest_default
(
newNode
);
UA_MonitoredItemCreateRequest
monRequest
=
UA_MonitoredItemCreateRequest_default
(
newNode
);
//monRequest.requestedParameters.samplingInterval = 100.0; /* 100 ms interval */
monRequest
.
requestedParameters
.
samplingInterval
=
PUBLISHING_INTERVAL
;
UA_Server_createDataChangeMonitoredItem
(
server
,
UA_TIMESTAMPSTORETURN_NEITHER
,
UA_Server_createDataChangeMonitoredItem
(
server
,
UA_TIMESTAMPSTORETURN_NEITHER
,
monRequest
,
NULL
,
dataChangeNotificationCallback
);
monRequest
,
NULL
,
dataChangeNotificationCallback
);
}
}
...
...
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