Low-Level C++ SDK  v1.3.0
Loading...
Searching...
No Matches
WeArtController.h
Go to the documentation of this file.
1#pragma once
2
4#include <string>
5
7enum WeArtMessageType
8{
9 MessageSent, MessageReceived
10};
11
13enum WeArtError
14{
15 ConnectionError, SendMessageError, ReceiveMessageError
16};
17
19static char messagesSeparator = '~';
20
22class UWeArtController
23{
24
25public:
26
27 void PauseController();
28 void UnpauseController();
29
30 void ScheduleController();
31
32 void SendMessage(WeArtMessage* message);
33 bool ReceiveMessages(std::vector<WeArtMessage*>& messages);
34
35 void OnMessageReceived(WeArtMessage* msg);
36 void StopConnection();
37
38 void LogMessage(WeArtMessageType type, std::string& message);
39 void LogError(WeArtError error, std::string& message);
40
41protected:
42
43 int clientPort;
44 bool debugMessages;
45 bool controllerAutoStart;
46
47 bool isCancellationRequested = false;
48 WeArtMessageSerializer messageSerializer;
49 uint8* messageReceivedBuffer[1024];
50 std::string trailingText;
51 bool IsConnected = false;
52 bool IsPaused = false;
53};