|
@@ -66,7 +66,7 @@ manuallyDefinePump(UA_Server *server) {
|
|
|
UA_Server_addObjectNode(server, UA_NODEID_NULL,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
|
|
|
- UA_QUALIFIEDNAME(1, "Pump (Manual)"), UA_NODEID_NULL,
|
|
|
+ UA_QUALIFIEDNAME(1, "Pump (Manual)"), UA_NODEID_NUMERIC(0, UA_NS0ID_BASEOBJECTTYPE),
|
|
|
oAttr, NULL, &pumpId);
|
|
|
|
|
|
UA_VariableAttributes mnAttr = UA_VariableAttributes_default;
|
|
@@ -76,7 +76,7 @@ manuallyDefinePump(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "ManufacturerName"),
|
|
|
- UA_NODEID_NULL, mnAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), mnAttr, NULL, NULL);
|
|
|
|
|
|
UA_VariableAttributes modelAttr = UA_VariableAttributes_default;
|
|
|
UA_String modelName = UA_STRING("Mega Pump 3000");
|
|
@@ -85,7 +85,7 @@ manuallyDefinePump(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "ModelName"),
|
|
|
- UA_NODEID_NULL, modelAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), modelAttr, NULL, NULL);
|
|
|
|
|
|
UA_VariableAttributes statusAttr = UA_VariableAttributes_default;
|
|
|
UA_Boolean status = true;
|
|
@@ -94,7 +94,7 @@ manuallyDefinePump(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "Status"),
|
|
|
- UA_NODEID_NULL, statusAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), statusAttr, NULL, NULL);
|
|
|
|
|
|
UA_VariableAttributes rpmAttr = UA_VariableAttributes_default;
|
|
|
UA_Double rpm = 50.0;
|
|
@@ -103,7 +103,7 @@ manuallyDefinePump(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "MotorRPMs"),
|
|
|
- UA_NODEID_NULL, rpmAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), rpmAttr, NULL, NULL);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -183,7 +183,7 @@ defineObjectTypes(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, deviceTypeId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "ManufacturerName"),
|
|
|
- UA_NODEID_NULL, mnAttr, NULL, &manufacturerNameId);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), mnAttr, NULL, &manufacturerNameId);
|
|
|
/* Make the manufacturer name mandatory */
|
|
|
UA_Server_addReference(server, manufacturerNameId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASMODELLINGRULE),
|
|
@@ -195,7 +195,7 @@ defineObjectTypes(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, deviceTypeId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "ModelName"),
|
|
|
- UA_NODEID_NULL, modelAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), modelAttr, NULL, NULL);
|
|
|
|
|
|
/* Define the object type for "Pump" */
|
|
|
UA_ObjectTypeAttributes ptAttr = UA_ObjectTypeAttributes_default;
|
|
@@ -212,7 +212,7 @@ defineObjectTypes(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpTypeId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "Status"),
|
|
|
- UA_NODEID_NULL, statusAttr, NULL, &statusId);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), statusAttr, NULL, &statusId);
|
|
|
/* Make the status variable mandatory */
|
|
|
UA_Server_addReference(server, statusId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASMODELLINGRULE),
|
|
@@ -224,7 +224,7 @@ defineObjectTypes(UA_Server *server) {
|
|
|
UA_Server_addVariableNode(server, UA_NODEID_NULL, pumpTypeId,
|
|
|
UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
|
|
|
UA_QUALIFIEDNAME(1, "MotorRPMs"),
|
|
|
- UA_NODEID_NULL, rpmAttr, NULL, NULL);
|
|
|
+ UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), rpmAttr, NULL, NULL);
|
|
|
}
|
|
|
|
|
|
/**
|