24 #include "ChimeraTK/ControlSystemAdapter/ControlSystemPVManager.h"
25 #include "ChimeraTK/SupportedUserTypes.h"
28 #include <boost/fusion/container/map.hpp>
32 namespace fusion = boost::fusion;
36 typedef fusion::map<fusion::pair<int8_t, uint>, fusion::pair<uint8_t, uint>, fusion::pair<int16_t, uint>,
37 fusion::pair<uint16_t, uint>, fusion::pair<int32_t, uint>, fusion::pair<uint32_t, uint>,
38 fusion::pair<int64_t, uint>, fusion::pair<uint64_t, uint>, fusion::pair<float, uint>, fusion::pair<double, uint>,
39 fusion::pair<string, uint>, fusion::pair<Boolean, uint>>
53 string nodeStringIdOverwrite;
54 string engineeringUnit;
56 UA_NodeId ownNodeId = UA_NODEID_NULL;
58 TypesMap typesMap{fusion::make_pair<int8_t>(UA_TYPES_SBYTE), fusion::make_pair<uint8_t>(UA_TYPES_BYTE),
59 fusion::make_pair<int16_t>(UA_TYPES_INT16), fusion::make_pair<uint16_t>(UA_TYPES_UINT16),
60 fusion::make_pair<int32_t>(UA_TYPES_INT32), fusion::make_pair<uint32_t>(UA_TYPES_UINT32),
61 fusion::make_pair<int64_t>(UA_TYPES_INT64), fusion::make_pair<uint64_t>(UA_TYPES_UINT64),
62 fusion::make_pair<float>(UA_TYPES_FLOAT), fusion::make_pair<double>(UA_TYPES_DOUBLE),
63 fusion::make_pair<string>(UA_TYPES_STRING), fusion::make_pair<Boolean>(UA_TYPES_BOOLEAN)};
67 boost::shared_ptr<ControlSystemPVManager>
csManager;
68 UA_StatusCode addPVChildNodes(UA_NodeId pvNodeId,
const string& baseNodePath,
UA_DataSource_Map& map);
74 UA_StatusCode mapSelfToNamespace(
const UA_Logger*
logger);
87 boost::shared_ptr<ControlSystemPVManager>
csManager,
const UA_Logger*
logger,
string overwriteNodeString =
"");
97 UA_DateTime getSourceTimeStamp();
99 static UA_StatusCode ua_readproxy_ua_processvariable_getName(UA_Server* server,
const UA_NodeId* sessionId,
100 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext, UA_Boolean includeSourceTimeStamp,
101 const UA_NumericRange* range, UA_DataValue* value);
109 static UA_StatusCode ua_readproxy_ua_processvariable_getType(UA_Server* server,
const UA_NodeId* sessionId,
110 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext, UA_Boolean includeSourceTimeStamp,
111 const UA_NumericRange* range, UA_DataValue* value);
119 static UA_StatusCode ua_readproxy_ua_processvariable_getEngineeringUnit(UA_Server* server,
120 const UA_NodeId* sessionId,
void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext,
121 UA_Boolean includeSourceTimeStamp,
const UA_NumericRange* range, UA_DataValue* value);
123 static UA_StatusCode ua_writeproxy_ua_processvariable_setEngineeringUnit(UA_Server* server,
124 const UA_NodeId* sessionId,
void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext,
125 const UA_NumericRange* range,
const UA_DataValue* value);
131 void setEngineeringUnit(
string engineeringUnit);
136 string getEngineeringUnit();
138 static UA_StatusCode ua_writeproxy_ua_processvariable_setDescription(UA_Server* server,
const UA_NodeId* sessionId,
139 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext,
const UA_NumericRange* range,
140 const UA_DataValue* value);
142 static UA_StatusCode ua_readproxy_ua_processvariable_getDescription(UA_Server* server,
const UA_NodeId* sessionId,
143 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext, UA_Boolean includeSourceTimeStamp,
144 const UA_NumericRange* range, UA_DataValue* value);
147 static UA_StatusCode ua_readproxy_ua_processvariable_getValidity(UA_Server* server,
const UA_NodeId* sessionId,
148 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext, UA_Boolean includeSourceTimeStamp,
149 const UA_NumericRange* range, UA_DataValue* value);
155 void setDescription(
string description);
160 string getDescription();
166 UA_NodeId getOwnNodeId();
169 static UA_StatusCode ua_readproxy_ua_processvariable_getValue(UA_Server* server,
const UA_NodeId* sessionId,
170 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext, UA_Boolean includeSourceTimeStamp,
171 const UA_NumericRange* range, UA_DataValue* value);
174 UA_StatusCode getValue(UA_Variant* v,
const UA_NumericRange* range);
177 static UA_StatusCode ua_writeproxy_ua_processvariable_setValue(UA_Server* server,
const UA_NodeId* sessionId,
178 void* sessionContext,
const UA_NodeId* nodeId,
void* nodeContext,
const UA_NumericRange* range,
179 const UA_DataValue* value);
182 UA_StatusCode setValue(
const UA_Variant* data);