08/28/2023
Hi,
we are trying to add the OpcUARoboticsNodSet2 to our opc ua server of our robotic system.
The DI nodeset is integrated successfully and shown in the structure as well as our internal opc ua functionality in UA Expert.
The robotics nodeset is not yet visiable, but we don't have any build errors. Only when we are editing the server.cpp file with addObjectNode (from open62541, according to the sample server example https://github.com/umati/Sampl.....dRobot.cpp) the object with it's children is shown.
std::stringstream ss;
ss << "http://example.com/" << Name << "/";
m_nsIndex = UA_Server_addNamespace(m_pServer, ss.str().c_str());
UA_ObjectAttributes objAttr = UA_ObjectAttributes_default;
objAttr.displayName = UA_LOCALIZEDTEXT_ALLOC("", Name.c_str());
objAttr.eventNotifier = UA_EVENTNOTIFIERTYPE_SUBSCRIBETOEVENTS;
auto status = UA_Server_addObjectNode(
m_pServer,
UA_NODEID_NUMERIC(m_nsIndex, 0),
UA_NODEID_NUMERIC(nsFromUri(m_pServer, constants::NsDIUri), UA_DIID_DEVICESET),
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
*open62541Cpp::UA_QualifiedName(m_nsIndex, Name).QualifiedName,
UA_NODEID_NUMERIC(nsFromUri(m_pServer, constants::NsRoboticsUri), UA_ROBOTICSID_MOTIONDEVICETYPE),
objAttr,
nullptr,
m_nodeId.NodeId);
The xml implementation for axis_1 to axis_7 for example is also not shown even if the motion device is added with the addObjectNode function.
Is it necessary to add all object manually or should the content of the robotics xml structure be shown by integration to the cmake file?
1 Guest(s)