25 OPCUATestServer(
const std::string& host, uint16_t port = 15480 );
30 bool isRunning()
const noexcept;
32 void setInt(
const std::string& name, int32_t value );
33 void setFloat(
const std::string& name,
float value );
34 void setBool(
const std::string& name,
bool value );
36 int32_t getInt(
const std::string& name )
const;
37 float getFloat(
const std::string& name )
const;
38 bool getBool(
const std::string& name )
const;
40 std::string nodeIdString(
const std::string& name )
const;
43 void ensureNode(
const std::string& name, opcua::DataTypeId type );
44 void writeValue(
const std::string& name, opcua::DataTypeId type,
const std::function<
void(opcua::Node<opcua::Server>&)>& fn );
49 opcua::Node<opcua::Server> node;
50 opcua::DataTypeId type;
52 NodeEntry(
const opcua::Node<opcua::Server>& n, opcua::DataTypeId t):
58 std::unique_ptr<opcua::Server> server;
59 std::optional<opcua::Node<opcua::Server>> ioNode;
60 mutable std::unordered_map<std::string, std::unique_ptr<NodeEntry>> nodes;
62 std::atomic_bool running {
false };