GoPxL SDK
GoSystem.h
Go to the documentation of this file.
1 
10 #ifndef GO_PXL_SDK_SYSTEM_H
11 #define GO_PXL_SDK_SYSTEM_H
12 
13 #include <GoPxLSdk/Def.h>
14 #include <GoPxLSdk/GoRestClient.h>
15 
16 #include <kApi/kApiDef.h>
17 #include <kApi/Io/kNetwork.h>
18 
19 namespace GoPxLSdk
20 {
30 {
31 /*
32  * Constant member value declarations;
33  */
34 private:
35 
50  static constexpr k64u GDP_TIMEOUT_MSEC = 15000;
51  static constexpr k64u START_TIMEOUT_MSEC = 15000;
52  static constexpr k64u STOP_TIMEOUT_MSEC = 15000;
53  static constexpr k64u RUNNING_STATE_TIMEOUT_MSEC = 15000;
54  static constexpr k64u SENSOR_PATH_TIMEOUT_MSEC = 15000;
55  static constexpr k64u CHILD_PATH_TIMEOUT_MSEC = 15000;
56  static constexpr k64u QUICKEDIT_TIMEOUT_MSEC = 15000;
57 
58 public:
59  enum class State
60  {
61  Ready = 0,
62  Running = 1,
63  Conflict = 2
64  };
65 
77  GoSystem() = default;
78 
92  explicit GoSystem(const kIpAddress& address, k16u port = GO_PXL_SDK_DEFAULT_CONTROL_PORT);
93 
100  ~GoSystem() = default;
101 
110  void SetAddress(const kIpAddress& ipAddress);
111 
118  kIpAddress Address() const;
119 
129  void SetControlPort(k16u port);
130 
137  k16u ControlPort() const;
138 
147  k16u GdpPort();
148 
156  void Connect();
157 
165  void Disconnect();
166 
174  bool IsConnected();
175 
186  void Start();
187 
198  void Stop();
199 
211  State RunningState();
212 
224  void EnableQuickEdit();
225 
236  void DisableQuickEdit();
237 
249  bool QuickEditEnabled();
250 
258  GoRestClient& Client();
259 
272  ResourcePath SensorPath(SerialNum serialNum);
273 
274 // Private member variables.
275 private:
276  GoRestClient restClient;
277 
278  kIpAddress address = { };
280 
281 // Private member functions.
282 private:
294  std::vector<ResourcePath> GetChildPaths(const ResourcePath& path);
295 };
296 
297 }
298 
299 #endif
std::string SerialNum
Definition: Def.h:50
constexpr k16u GO_PXL_SDK_DEFAULT_CONTROL_PORT
Definition: Def.h:39
#define GoPxLSdkClass
Definition: Def.h:35
std::string ResourcePath
Definition: Def.h:51
Declares the GoPxLSdk.GoRestClient class.
Represents a single Gocator system.
Definition: GoSystem.h:29
Definition: GoRestClient.h:37
Declares the general SDK definitions.
State
Definition: GoSystem.h:59
Definition: Def.h:46