ASNeG / OpcUaPiXtendServer

OPC UA PiXtend Server
Apache License 2.0
2 stars 1 forks source link

Assignment of pin name or default variable #61

Closed huebl closed 2 years ago

huebl commented 2 years ago

The assignment of the node name to the pin name is defined with class NodePinConfig. In some situations, however, it makes sense to assign a fixed variable to the node. A pin is not needed in this case. For this task, the class NodePinConfig is extended by a variables.

ToDo: Class NodePinConfig (https://github.com/ASNeG/OpcUaPiXtendServer/blob/Release1/src/OpcUaPiXtendServer/OpcUaServer/PiXtendBaseServer.h#L33)

  1. Add a variable to class NodePinConfig

ToDo: Class NodeContext (https://github.com/ASNeG/OpcUaPiXtendServer/blob/Release1/src/OpcUaPiXtendServer/OpcUaServer/NodeContext.h#L30)

  1. Add a variable to class NodeContext

ToDo: Function PiXtendBaseServer::createNodeContext (https://github.com/ASNeG/OpcUaPiXtendServer/blob/Release1/src/OpcUaPiXtendServer/OpcUaServer/PiXtendBaseServer.cpp#L138)

  1. The pin name is empty and the variable exist in NodePinConfig: a) set hardware context to nullptr (We dont use a hardware context in this case) b) set existing variable from NodePinConfig in node context

ToDo: Function PiXtendBaseServer::registerServiceFunctions (https://github.com/ASNeG/OpcUaPiXtendServer/blob/Release1/src/OpcUaPiXtendServer/OpcUaServer/PiXtendBaseServer.cpp#L193)

  1. The node context is null and the variable exist in node context a) do not register service functions b) Use variable in node context to set variable in opc ua information model