9 #ifndef GO_PXL_SDK_GORESTCLIENT_H
10 #define GO_PXL_SDK_GORESTCLIENT_H
12 #include <kApi/Io/kNetwork.h>
20 class GoRestClientTests;
34 using GoStreamHandler = std::function<void(const std::shared_ptr<GoStreamResponse>&)>;
58 void Connect(kIpAddress address, k16u port = 0);
76 bool IsConnected()
const;
230 void ResponseHandler(std::shared_ptr<GoResponse> response);
232 void WriteErrorHandler(k64u requestId,
const std::exception& e);
234 void Callback(std::shared_ptr<GoResponse> response);
239 std::mutex commandMutex;
242 std::deque<GoTransaction> transactionQueue;
244 std::shared_ptr<GoCtrlChannel> channel;
249 friend class ::GoRestClientTests;
Simplify working with json data.
Definition: GoJson.h:38
std::function< void(const std::shared_ptr< GoStreamResponse > &)> GoStreamHandler
Data handler used in GoRestClient::StartStream.
Definition: GoRestClient.h:34
#define GoPxLSdkClass
Definition: Def.h:35
std::function< void(const std::shared_ptr< GoNotificationResponse > &)> GoNotificationHandler
Notification handler used in GoRestClient::Sub.
Definition: GoRestClient.h:28
Definition: GoRestClient.h:36
Definition: GoTransaction.h:23
std::function< void(ReadErrorType readErrorType, const std::exception &e)> GoCtrlChannelReadErrorHandler
Function to receive read thread errors.
Definition: GoCtrlChannel.h:44