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 UPROPERTY(Config)
25 bool DefaultConnectToROS = true;
26
27 UPROPERTY(Config)
28 FString DefaultROSHost = "127.0.0.1";
29
30 UPROPERTY(Config)
31 bool DefaultAsyncROSConnection = true;
32
33 UPROPERTY(Config)
34 int DefaultROSPort = 9090;
35
36 UPROPERTY(Config)
37 int DefaultROSMaxRetries = 3;
38
39private:
43 virtual void ROSBridgeConnected() override;
44
48 virtual void ROSBridgeDisconnected() override;
49
53 void ParseLaunchArguments(bool& ConnectToROS, bool& AsyncROSConnection, FString& Host, int& Port, int& MaxRetries);
54};