Agrarsense
AgrarsenseGameInstance.h
Go to the documentation of this file.
1// Copyright (c) 2023 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "Engine/GameInstance.h"
9#include "ROSIntegrationGameInstance.h"
10
11#include "AgrarsenseGameInstance.generated.h"
12
13UCLASS(config = AgrarsenseSettings)
14class AGRARSENSE_API UAgrarsenseGameInstance : public UROSIntegrationGameInstance
15{
16 GENERATED_BODY()
17
18public:
19
20 virtual void Init() override;
21
22 virtual void BeginDestroy() override;
23
24 virtual void Shutdown() override;
25
26 UPROPERTY(Config)
27 bool DefaultConnectToROS = true;
28
29 UPROPERTY(Config)
30 FString DefaultROSHost = "127.0.0.1";
31
32 UPROPERTY(Config)
33 bool DefaultAsyncROSConnection = true;
34
35 UPROPERTY(Config)
36 int DefaultROSPort = 9090;
37
38 UPROPERTY(Config)
39 int DefaultROSMaxRetries = 3;
40
41private:
45 virtual void ROSBridgeConnected() override;
46
50 virtual void ROSBridgeDisconnected() override;
51
55 void ParseLaunchArguments(bool& ConnectToROS, bool& AsyncROSConnection, FString& Host, int& Port, int& MaxRetries);
56};