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
f2bfc98e
Commit
f2bfc98e
authored
Apr 19, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use 32bits rather than 64 bits as arm7l is 32 bits only.
parent
e6e3548b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+5
-5
coupler/opc-ua-server/server_subscribe.c
coupler/opc-ua-server/server_subscribe.c
+7
-7
No files found.
coupler/opc-ua-server/server.c
View file @
f2bfc98e
...
...
@@ -228,22 +228,22 @@ int main(int argc, char **argv)
#endif
// enable keep-alive
UA_Int
64
defaultInt64
=
0
;
UA_Int
64
couplerID
=
atoi
(
arguments
.
id
);
UA_Int
32
defaultInt32
=
0
;
UA_Int
32
couplerID
=
atoi
(
arguments
.
id
);
const
PublishedVariable
publishedVariableArray
[]
=
{
// representing time in millis since start of process
{
.
name
=
"heart_beat"
,
.
description
=
"Heart beat"
,
.
pdefaultValue
=
&
defaultInt
64
,
.
type
=
UA_TYPES
[
UA_TYPES_INT
64
]
.
pdefaultValue
=
&
defaultInt
32
,
.
type
=
UA_TYPES
[
UA_TYPES_INT
32
]
},
// representing the ID of the coupler
{
.
name
=
"id"
,
.
description
=
"ID"
,
.
pdefaultValue
=
&
couplerID
,
.
type
=
UA_TYPES
[
UA_TYPES_INT
64
]
.
type
=
UA_TYPES
[
UA_TYPES_INT
32
]
}
};
...
...
coupler/opc-ua-server/server_subscribe.c
View file @
f2bfc98e
...
...
@@ -28,10 +28,10 @@ static void dataChangeNotificationCallback(UA_Server *server, UA_UInt32 monitore
void
*
monitoredItemContext
,
const
UA_NodeId
*
nodeId
,
void
*
nodeContext
,
UA_UInt32
attributeId
,
const
UA_DataValue
*
var
)
{
if
(
UA_Variant_hasScalarType
(
&
var
->
value
,
&
UA_TYPES
[
UA_TYPES_INT
64
]))
{
if
(
UA_Variant_hasScalarType
(
&
var
->
value
,
&
UA_TYPES
[
UA_TYPES_INT
32
]))
{
UA_LOG_INFO
(
UA_Log_Stdout
,
UA_LOGCATEGORY_USERLAND
,
"Received Notification with value %
l
d"
,
*
(
UA_Int
64
*
)
var
->
value
.
data
);
"Received Notification with value %d"
,
*
(
UA_Int
32
*
)
var
->
value
.
data
);
}
}
...
...
@@ -221,17 +221,17 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
/* heartbeat */
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
0
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT
64
].
typeId
,
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT
32
].
typeId
,
&
pMetaData
->
fields
[
0
].
dataType
);
pMetaData
->
fields
[
0
].
builtInType
=
UA_NS0ID_INT
64
;
pMetaData
->
fields
[
0
].
builtInType
=
UA_NS0ID_INT
32
;
pMetaData
->
fields
[
0
].
name
=
UA_STRING
(
"Heartbeat (subscribed)"
);
pMetaData
->
fields
[
0
].
valueRank
=
-
1
;
/* scalar */
// ID
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
1
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT
64
].
typeId
,
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT
32
].
typeId
,
&
pMetaData
->
fields
[
1
].
dataType
);
pMetaData
->
fields
[
1
].
builtInType
=
UA_NS0ID_INT
64
;
pMetaData
->
fields
[
1
].
builtInType
=
UA_NS0ID_INT
32
;
pMetaData
->
fields
[
1
].
name
=
UA_STRING
(
"ID (subscribed)"
);
pMetaData
->
fields
[
1
].
valueRank
=
-
1
;
/* scalar */
}
...
...
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