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
nexedi
osie
Commits
05031e3c
Commit
05031e3c
authored
Feb 05, 2025
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics.
parent
0dd8cab8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
7 deletions
+1
-7
coupler/keep_alive_publisher.h
coupler/keep_alive_publisher.h
+0
-3
coupler/keep_alive_subscriber.h
coupler/keep_alive_subscriber.h
+1
-4
No files found.
coupler/keep_alive_publisher.h
View file @
05031e3c
...
...
@@ -145,12 +145,10 @@ static void addPubSubDataSetField(UA_Server *server, PublishedVariable varDetail
&
dataSetFieldConfig
,
&
dataSetFieldIdent
);
}
void
callbackTicHeartBeat
()
{
/* Increase periodically heart beats of the server */
HEART_BEATS
+=
1
;
//UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "\theart_beat %d", HEART_BEATS);
// set OPC UA's heat_beat node value
UA_NodeId
myFloatNodeId
=
UA_NODEID_STRING
(
1
,
"heart_beat"
);
...
...
@@ -178,7 +176,6 @@ void callbackTicHeartBeat()
UA_Server_writeValue
(
server
,
myFloatNodeId
,
myVar
);
}
static
void
enablePublishHeartBeat
(
UA_Server
*
server
){
size_t
i
;
// add a callback which will increment heart beat tics
...
...
coupler/keep_alive_subscriber.h
View file @
05031e3c
...
...
@@ -240,11 +240,10 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
}
void
callbackCheckHeartBeat
()
{
/*
* Check if for liveness of related couplers. Called upon a certain interval.
* If a related coupler is down go
t
to safe mode.
* If a related coupler is down go to safe mode.
*/
int
coupler_id
,
last_seen_timestamp_int
,
timestamp_delta
;
bool
is_down
;
...
...
@@ -256,7 +255,6 @@ void callbackCheckHeartBeat() {
// convert to str as this is the hash key
char
*
coupler_id_str
=
convertInt2Str
(
coupler_id
);
char
*
last_seen_timestamp
=
getItem
(
SUBSCRIBER_DICT
,
coupler_id_str
);
//UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "Check ID=%s, last_seen=%s", coupler_id_str, last_seen_timestamp);
if
(
last_seen_timestamp
!=
NULL
){
// we do have timestamp for this coupler ID
last_seen_timestamp_int
=
atoi
(
last_seen_timestamp
);
...
...
@@ -301,7 +299,6 @@ void callbackCheckHeartBeat() {
}
}
static
void
enableSubscribeToHeartBeat
(
UA_Server
*
server
,
UA_ServerConfig
*
config
){
// enable subscribe to keep-alive messages
UA_String
transportProfile
=
UA_STRING
(
DEFAULT_TRANSPORT_PROFILE
);
...
...
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