Commit f2bfc98e authored by Ivan Tyagov's avatar Ivan Tyagov

Use 32bits rather than 64 bits as arm7l is 32 bits only.

parent e6e3548b
...@@ -228,22 +228,22 @@ int main(int argc, char **argv) ...@@ -228,22 +228,22 @@ int main(int argc, char **argv)
#endif #endif
// enable keep-alive // enable keep-alive
UA_Int64 defaultInt64 = 0; UA_Int32 defaultInt32 = 0;
UA_Int64 couplerID = atoi(arguments.id); UA_Int32 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
{ {
.name = "heart_beat", .name = "heart_beat",
.description = "Heart beat", .description = "Heart beat",
.pdefaultValue = &defaultInt64, .pdefaultValue = &defaultInt32,
.type = UA_TYPES[UA_TYPES_INT64] .type = UA_TYPES[UA_TYPES_INT32]
}, },
// representing the ID of the coupler // representing the ID of the coupler
{ {
.name = "id", .name = "id",
.description = "ID", .description = "ID",
.pdefaultValue = &couplerID, .pdefaultValue = &couplerID,
.type = UA_TYPES[UA_TYPES_INT64] .type = UA_TYPES[UA_TYPES_INT32]
} }
}; };
......
...@@ -28,10 +28,10 @@ static void dataChangeNotificationCallback(UA_Server *server, UA_UInt32 monitore ...@@ -28,10 +28,10 @@ static void dataChangeNotificationCallback(UA_Server *server, UA_UInt32 monitore
void *monitoredItemContext, const UA_NodeId *nodeId, void *monitoredItemContext, const UA_NodeId *nodeId,
void *nodeContext, UA_UInt32 attributeId, void *nodeContext, UA_UInt32 attributeId,
const UA_DataValue *var) { const UA_DataValue *var) {
if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_INT64])) { if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_INT32])) {
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND,
"Received Notification with value %ld", "Received Notification with value %d",
*(UA_Int64*) var->value.data); *(UA_Int32*) var->value.data);
} }
} }
...@@ -221,17 +221,17 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) { ...@@ -221,17 +221,17 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
/* heartbeat */ /* heartbeat */
UA_FieldMetaData_init (&pMetaData->fields[0]); UA_FieldMetaData_init (&pMetaData->fields[0]);
UA_NodeId_copy (&UA_TYPES[UA_TYPES_INT64].typeId, UA_NodeId_copy (&UA_TYPES[UA_TYPES_INT32].typeId,
&pMetaData->fields[0].dataType); &pMetaData->fields[0].dataType);
pMetaData->fields[0].builtInType = UA_NS0ID_INT64; pMetaData->fields[0].builtInType = UA_NS0ID_INT32;
pMetaData->fields[0].name = UA_STRING ("Heartbeat (subscribed)"); pMetaData->fields[0].name = UA_STRING ("Heartbeat (subscribed)");
pMetaData->fields[0].valueRank = -1; /* scalar */ pMetaData->fields[0].valueRank = -1; /* scalar */
// ID // ID
UA_FieldMetaData_init (&pMetaData->fields[1]); UA_FieldMetaData_init (&pMetaData->fields[1]);
UA_NodeId_copy (&UA_TYPES[UA_TYPES_INT64].typeId, UA_NodeId_copy (&UA_TYPES[UA_TYPES_INT32].typeId,
&pMetaData->fields[1].dataType); &pMetaData->fields[1].dataType);
pMetaData->fields[1].builtInType = UA_NS0ID_INT64; pMetaData->fields[1].builtInType = UA_NS0ID_INT32;
pMetaData->fields[1].name = UA_STRING ("ID (subscribed)"); pMetaData->fields[1].name = UA_STRING ("ID (subscribed)");
pMetaData->fields[1].valueRank = -1; /* scalar */ pMetaData->fields[1].valueRank = -1; /* scalar */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment