1 #ifndef _TEST_SAMPLE_DATA_H_
2 #define _TEST_SAMPLE_DATA_H_
4 #include "ChimeraTK/ControlSystemAdapter/ControlSystemPVManager.h"
5 #include "ChimeraTK/ControlSystemAdapter/DevicePVManager.h"
6 #include "ChimeraTK/ControlSystemAdapter/ProcessArray.h"
7 #include "ChimeraTK/ControlSystemAdapter/PVManager.h"
14 #include <open62541/client.h>
15 #include <open62541/client_config_default.h>
16 #include <open62541/client_highlevel.h>
17 #include <open62541/server_config_default.h>
23 std::pair<boost::shared_ptr<ControlSystemPVManager>, boost::shared_ptr<DevicePVManager>>
pvManagers;
24 boost::shared_ptr<ControlSystemPVManager>
csManager;
28 std::cout <<
"TestFixtureEmptySet BEGIN" << std::endl;
29 std::cout <<
"TestFixtureEmptySet END" << std::endl;
34 std::pair<boost::shared_ptr<ControlSystemPVManager>, boost::shared_ptr<DevicePVManager>>
pvManagers;
35 boost::shared_ptr<ControlSystemPVManager>
csManager;
39 std::cout <<
"TestFixturePVSet BEGIN" << std::endl;
42 ProcessArray<int8_t>::SharedPtr intA8dev =
devManager->createProcessArray<int8_t>(
43 SynchronizationDirection::controlSystemToDevice,
"int8Scalar", 1,
"Einheit",
"Beschreibung der Variable");
44 ProcessArray<uint8_t>::SharedPtr intAu8dev =
45 devManager->createProcessArray<uint8_t>(SynchronizationDirection::controlSystemToDevice,
"uint8Scalar", 1);
46 ProcessArray<int16_t>::SharedPtr intA16dev =
47 devManager->createProcessArray<int16_t>(SynchronizationDirection::controlSystemToDevice,
"int16Scalar", 1);
48 ProcessArray<uint16_t>::SharedPtr intAu16dev =
49 devManager->createProcessArray<uint16_t>(SynchronizationDirection::controlSystemToDevice,
"uint16Scalar", 1);
50 ProcessArray<int32_t>::SharedPtr intA3devMap =
devManager->createProcessArray<int32_t>(
51 SynchronizationDirection::controlSystemToDevice,
"Dein/Name/ist/int32Scalar", 1);
52 ProcessArray<uint32_t>::SharedPtr intAu32devMap =
devManager->createProcessArray<uint32_t>(
53 SynchronizationDirection::controlSystemToDevice,
"Mein/Name/ist/uint32Scalar", 1);
54 ProcessArray<int64_t>::SharedPtr intA64devMap =
devManager->createProcessArray<int64_t>(
55 SynchronizationDirection::controlSystemToDevice,
"Mein/Name/ist/int64Scalar", 1);
56 ProcessArray<uint64_t>::SharedPtr intAu64devMap =
devManager->createProcessArray<uint64_t>(
57 SynchronizationDirection::controlSystemToDevice,
"Mein/Name/ist/uint64Scalar", 1);
58 ProcessArray<float>::SharedPtr intAfdev =
59 devManager->createProcessArray<
float>(SynchronizationDirection::controlSystemToDevice,
"floatScalar", 1);
60 ProcessArray<double>::SharedPtr doubledevMap =
devManager->createProcessArray<
double>(
61 SynchronizationDirection::controlSystemToDevice,
"Dieser/Name/ist/doubleScalar", 1);
62 ProcessArray<string>::SharedPtr stringAddev2 =
63 devManager->createProcessArray<
string>(SynchronizationDirection::deviceToControlSystem,
64 "1/FOLDER/defaultSep/stringScalar", 1,
"my description",
"desc");
66 ProcessArray<int8_t>::SharedPtr intB15A8devMap =
67 devManager->createProcessArray<int8_t>(SynchronizationDirection::controlSystemToDevice,
68 "Mein/Name_ist#int8Array_s15", 15,
"Einheit",
"Beschreibung der Variable");
69 ProcessArray<uint8_t>::SharedPtr intB10Au8devMap1 =
devManager->createProcessArray<uint8_t>(
70 SynchronizationDirection::controlSystemToDevice,
"Dein/Name/ist/uint8Array_s10", 10);
71 ProcessArray<int16_t>::SharedPtr intB10Au16devMap2 =
devManager->createProcessArray<int16_t>(
72 SynchronizationDirection::controlSystemToDevice,
"Unser/Name/ist_int16Array_s10", 12);
73 ProcessArray<uint16_t>::SharedPtr intB10Au8devMap2 =
74 devManager->createProcessArray<uint16_t>(SynchronizationDirection::controlSystemToDevice,
75 "Unser/Name/ist_uint8Array_s10", 10,
"Einheit",
"Beschreibung der Variable");
76 ProcessArray<int32_t>::SharedPtr intB15A32dev =
77 devManager->createProcessArray<int32_t>(SynchronizationDirection::controlSystemToDevice,
"int32Array_s15", 15);
78 ProcessArray<uint32_t>::SharedPtr intB10Au32dev =
devManager->createProcessArray<uint32_t>(
79 SynchronizationDirection::controlSystemToDevice,
"uint32Array_s10", 10);
80 ProcessArray<int64_t>::SharedPtr intB15A64dev =
81 devManager->createProcessArray<int64_t>(SynchronizationDirection::controlSystemToDevice,
"int64Array_s15", 15);
82 ProcessArray<uint64_t>::SharedPtr intB15Au64dev =
devManager->createProcessArray<uint64_t>(
83 SynchronizationDirection::controlSystemToDevice,
"uint64Array_s10", 10);
84 ProcessArray<double>::SharedPtr intB15Afdev =
85 devManager->createProcessArray<
double>(SynchronizationDirection::controlSystemToDevice,
"doubleArray_s15", 15);
86 ProcessArray<float>::SharedPtr intB10Addev =
devManager->createProcessArray<
float>(
87 SynchronizationDirection::controlSystemToDevice,
"floatArray_s101234", 10);
89 std::cout <<
"TestFixturePVSet END" << std::endl;
94 uint32_t opcuaPort = 16663;
97 UA_Server* mappedServer{
nullptr};
102 this->mappedServer = UA_Server_new();
103 UA_ServerConfig_setMinimal(UA_Server_getConfig(this->mappedServer), opcuaPort, NULL);
104 server_config = UA_Server_getConfig(mappedServer);
106 runUAServer = UA_TRUE;
107 baseNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
113 if(mappedServer !=
nullptr) UA_Server_delete(mappedServer);
117 #endif // _TEST_SAMPLE_DATA_H_