3#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "Kismet/GameplayStatics.h"
14#include "Containers/Ticker.h"
27static char messagesSeparator =
'~';
46 virtual void Initialize(FSubsystemCollectionBase& Collection)
override;
47 virtual void Deinitialize()
override;
49 UFUNCTION(BlueprintCallable)
50 void PauseController();
51 UFUNCTION(BlueprintCallable)
52 void UnpauseController();
53 UFUNCTION(BlueprintCallable)
54 void StartCalibration();
55 UFUNCTION(BlueprintCallable)
56 void StopCalibration();
57 UFUNCTION(BlueprintCallable)
58 bool GetIsAutoCalibrationOn();
59 UFUNCTION(BlueprintCallable)
60 bool GetIsAutoRawDataOn();
61 UFUNCTION(BlueprintCallable)
62 void RequestMiddlewareStatus();
64 void ScheduleController();
67 bool ReceiveMessages(std::vector<WeArtMessage*>& messages);
70 void StopConnection();
73 void LogError(
WeArtError error, FString& message);
75 void HandleReceivedMessage(FString& message);
92 bool ControllerAutoStart;
95 bool CalibrationAutoStart;
98 bool RawDataAutoStart;
100 bool initialized = false;
101 bool foundTrackingCalibration = false;
102 bool foundCalibrationUX = false;
103 bool foundStatusTracker = false;
104 bool isCancellationRequested = false;
107 uint8* messageReceivedBuffer[1024];
109 bool IsConnected = false;
110 bool IsPaused = false;
112 void Tick(
float DeltaTime) override;
113 bool IsTickable() const override;
114 bool IsTickableInEditor() const override;
115 bool IsTickableWhenPaused() const override;
116 TStatId GetStatId() const override;
117 UWorld* GetWorld() const override;
#define WEARTPLUGIN_API
Definition: Definitions.WEARTPlugin.h:26
WeArtError
Definition: WeArtController.h:23
@ ConnectionError
Definition: WeArtController.h:24
@ SendMessageError
Definition: WeArtController.h:24
@ ReceiveMessageError
Definition: WeArtController.h:24
WeArtMessageType
Definition: WeArtController.h:18
@ MessageReceived
Definition: WeArtController.h:19
@ MessageSent
Definition: WeArtController.h:19
Contains the declaration of the AWeArtTrackingCalibration class.
Definition: WeArtCalibrationUX.h:18
Tracks the status of connected devices and middleware.
Definition: WeArtStatusTracker.h:107
Calibration status/result observer.
Definition: WeArtTrackingCalibration.h:23
Weart controller, used to connect to the Weart middleware, perform operations and receive messages.
Definition: WeArtController.h:34
TArray< UWeArtThimbleSensorObject * > thimbleSensorObjects
Definition: WeArtController.h:82
AWeArtCalibrationUX * CalibrationUX
Definition: WeArtController.h:43
AWeArtTrackingCalibration * TrackingCalibration
Definition: WeArtController.h:42
TArray< UWeArtThimbleTrackingObject * > thimbleTrackingObjects
Definition: WeArtController.h:81
AWeArtStatusTracker * StatusTracker
Definition: WeArtController.h:44
Generic Weart message.
Definition: WeArtMessages.h:178
Serializer for communication with the middleware.
Definition: WeArtMessageSerializer.h:10
Definition: json.hpp:5292