Commit v.2025
This commit is contained in:
29
Source/DTFluxCore/DTFluxCore.Build.cs
Normal file
29
Source/DTFluxCore/DTFluxCore.Build.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class DTFluxCore : ModuleRules
|
||||
{
|
||||
public DTFluxCore(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
"DTFluxCore",
|
||||
"DTFluxProjectSettings",
|
||||
"DTFluxNetwork"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
4
Source/DTFluxCore/Private/Assets/DTFluxModelAsset.cpp
Normal file
4
Source/DTFluxCore/Private/Assets/DTFluxModelAsset.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "Assets/DTFluxModelAsset.h"
|
||||
19
Source/DTFluxCore/Private/DTFluxCoreModule.cpp
Normal file
19
Source/DTFluxCore/Private/DTFluxCoreModule.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "DTFluxCoreModule.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FDTFluxCoreModule"
|
||||
|
||||
DTFLUXCORE_API DEFINE_LOG_CATEGORY(logDTFluxCore);
|
||||
|
||||
void FDTFluxCoreModule::StartupModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FDTFluxCoreModule::ShutdownModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FDTFluxCoreModule, DTFluxCore)
|
||||
11
Source/DTFluxCore/Private/Types/DTFluxCoreEnums.h
Normal file
11
Source/DTFluxCore/Private/Types/DTFluxCoreEnums.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxCoreEnums.generated.h"
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EDTFluxConnectionStatus : uint8
|
||||
{
|
||||
Unset = 0 UMETA(DisplayName="Unset"),
|
||||
Connected = 1 << 0 UMETA(DisplayName="Connected"),
|
||||
Error = 2 << 1 UMETA(DisplayName="Error")
|
||||
};
|
||||
@ -0,0 +1,7 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "Types/Interfaces/DTFluxDataPoller.h"
|
||||
|
||||
|
||||
// Add default functionality here for any IDTFluxDataPoller functions that are not pure virtual.
|
||||
27
Source/DTFluxCore/Public/Assets/DTFluxModelAsset.h
Normal file
27
Source/DTFluxCore/Public/Assets/DTFluxModelAsset.h
Normal file
@ -0,0 +1,27 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "DTFluxModelAsset.generated.h"
|
||||
|
||||
class UDTFluxContest;
|
||||
class UDTFluxPerson;
|
||||
/**
|
||||
* Class representing Data Storage
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxModelAsset : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Storage")
|
||||
TArray<UDTFluxPerson*> Persons;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Storage")
|
||||
TArray<UDTFluxContest*> Contest;
|
||||
|
||||
};
|
||||
25
Source/DTFluxCore/Public/DTFluxCoreModule.h
Normal file
25
Source/DTFluxCore/Public/DTFluxCoreModule.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
/**
|
||||
* @module DTFluxCoreModule
|
||||
* @details DTFlux Project is a framework to integrate all kind of events data from
|
||||
* multiple API (stopwatch servers, etc...) or manually to unreal motion design platform
|
||||
* to create live audiovisual shows.
|
||||
* @brief This module provides all necessary basic class to set up your communication
|
||||
* between an external APIs and unreal engine.
|
||||
* @license See LICENSE.TXT at the of DTFluxAPI plugin folder or at
|
||||
* @see https://github.com/A2MSystemes/DTFluxAPI/blob/main/LICENSE
|
||||
* @author Ange-Marie MAURIN
|
||||
*/
|
||||
|
||||
DTFLUXCORE_API DECLARE_LOG_CATEGORY_EXTERN(logDTFluxCore, Log, All);
|
||||
|
||||
class FDTFluxCoreModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
20
Source/DTFluxCore/Public/Types/DTFluxModelEnums.h
Normal file
20
Source/DTFluxCore/Public/Types/DTFluxModelEnums.h
Normal file
@ -0,0 +1,20 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxModelEnums.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UENUM(BlueprintType, Category="DTFlux|Model")
|
||||
enum class EDTFluxParticipantStatusType : uint8
|
||||
{
|
||||
Normal = 0 UMETA(DisplayName="Normal"),
|
||||
OutOfRace = 1 UMETA(DisplayName="HorsCourse"),
|
||||
DSQ = 2 UMETA(DisplayName="Disqualifié"),
|
||||
DNF = 3 UMETA(DisplayName="Abandon"),
|
||||
DNS = 4 UMETA(DisplayName="NonPartant"),
|
||||
NotLinedUp = 5 UMETA(DisplayName="NonPresentAuDépart"),
|
||||
};
|
||||
25
Source/DTFluxCore/Public/Types/Interfaces/DTFluxData.h
Normal file
25
Source/DTFluxCore/Public/Types/Interfaces/DTFluxData.h
Normal file
@ -0,0 +1,25 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxData.generated.h"
|
||||
|
||||
/**
|
||||
* @brief Structure that represent Basic Data
|
||||
*/
|
||||
UCLASS(BlueprintType, Blueprintable)
|
||||
class DTFLUXCORE_API UDTFluxData: public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UDTFluxData(){};
|
||||
~UDTFluxData(){};
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
FName RequestId;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
FDateTime ReceivedAt = FDateTime::Now();
|
||||
|
||||
};
|
||||
@ -0,0 +1,32 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxResponse.h"
|
||||
#include "UObject/Interface.h"
|
||||
#include "DTFluxDataCollector.generated.h"
|
||||
|
||||
// This class does not need to be modified.
|
||||
UINTERFACE()
|
||||
class UDTFluxDataCollector : public UInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class IDTFluxDataCollector
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDataReceived, FDTFluxResponse, Response);
|
||||
virtual FOnDataReceived& OnReceivedData()=0;
|
||||
|
||||
virtual void ParseData(const FString& InData) = 0;
|
||||
virtual TSubclassOf<UDTFluxData> GetData() = 0;
|
||||
|
||||
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
|
||||
public:
|
||||
};
|
||||
40
Source/DTFluxCore/Public/Types/Interfaces/DTFluxDataPoller.h
Normal file
40
Source/DTFluxCore/Public/Types/Interfaces/DTFluxDataPoller.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxData.h"
|
||||
#include "DTFluxDataCollector.h"
|
||||
#include "DTFluxRequest.h"
|
||||
#include "DTFluxResponse.h"
|
||||
#include "UObject/Interface.h"
|
||||
#include "DTFluxDataPoller.generated.h"
|
||||
|
||||
// This class does not need to be modified.
|
||||
UINTERFACE(BlueprintType, Blueprintable)
|
||||
class UDTFluxDataCollectorPoller : public UInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Interface for Data collector that can Poll for Data from datasource
|
||||
*/
|
||||
class IDTFluxDataCollectorPoller : public IDTFluxDataCollector
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnBeforePolling, FDTFluxRequest&, FutureRequest);
|
||||
virtual FOnBeforePolling& OnBeforePolling() = 0 ;
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAfterRequestSent, const FName, RequestId);
|
||||
virtual FOnAfterRequestSent& OnAfterRequestSent() = 0;
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAfterPolling, const FDTFluxRequest&, FutureRequest);
|
||||
virtual FOnAfterPolling& OnAfterPolling()=0;
|
||||
|
||||
};
|
||||
31
Source/DTFluxCore/Public/Types/Interfaces/DTFluxRequest.h
Normal file
31
Source/DTFluxCore/Public/Types/Interfaces/DTFluxRequest.h
Normal file
@ -0,0 +1,31 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxRequest.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT(BlueprintType, Blueprintable)
|
||||
struct DTFLUXCORE_API FDTFluxRequest
|
||||
{
|
||||
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
FDTFluxRequest()
|
||||
{
|
||||
RequestId = FName("DefautRequestId");
|
||||
RequestBody = FString();
|
||||
RequestedAt = FDateTime::Now();
|
||||
};
|
||||
~FDTFluxRequest(){};
|
||||
|
||||
UPROPERTY(BlueprintReadWrite);
|
||||
FName RequestId;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
FString RequestBody;
|
||||
UPROPERTY(BlueprintReadOnly);
|
||||
FDateTime RequestedAt;
|
||||
};
|
||||
34
Source/DTFluxCore/Public/Types/Interfaces/DTFluxResponse.h
Normal file
34
Source/DTFluxCore/Public/Types/Interfaces/DTFluxResponse.h
Normal file
@ -0,0 +1,34 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxData.h"
|
||||
#include "DTFluxResponse.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT(BlueprintType, Blueprintable)
|
||||
struct DTFLUXCORE_API FDTFluxResponse
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
FDTFluxResponse()
|
||||
{
|
||||
RequestId = FName("DefaultRequestId");
|
||||
ReceivedAt = FDateTime::Now();
|
||||
Data = nullptr;
|
||||
};
|
||||
~FDTFluxResponse(){};
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
FName RequestId;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
FDateTime ReceivedAt;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
UDTFluxData* Data;
|
||||
|
||||
};
|
||||
175
Source/DTFluxCore/Public/Types/UDTFluxDataModel.h
Normal file
175
Source/DTFluxCore/Public/Types/UDTFluxDataModel.h
Normal file
@ -0,0 +1,175 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "DTFluxModelEnums.h"
|
||||
#include "UDTFluxDataModel.generated.h"
|
||||
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType, Category="DTFlux|Model")
|
||||
class DTFLUXCORE_API UDTFluxPerson : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString FirstName;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString LastName;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString Gender;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString FunctionLine1 = TEXT("");
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString FunctionLine2 = TEXT("");
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxParticipant : public UDTFluxPerson
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString Category;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString Club;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
bool Elite;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxTeam : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
int Bib;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
UDTFluxParticipant* Participant1;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
UDTFluxParticipant* Participant2;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
EDTFluxParticipantStatusType Status;
|
||||
};
|
||||
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxRankingBase : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
int Bib;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
int Ranking;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
FString Time;
|
||||
};
|
||||
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxContestRanking : public UDTFluxRankingBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|model")
|
||||
int ContestId;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FString Gap;
|
||||
};
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxStageRanking : public UDTFluxContestRanking
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
int StageId;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FString TimeSwim;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FString TimeTransition;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FString TimeRun;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FDateTime TimeStart;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
float SpeedRunning;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
float SpeedTotal;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
float SpeedSwim;
|
||||
};
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxSplitRanking : public UDTFluxStageRanking
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
int SplitId;
|
||||
};
|
||||
|
||||
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxEvent : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
int Id;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FString Name;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
FDateTime StartTime;
|
||||
};
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxSplit : public UDTFluxEvent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
TArray<UDTFluxSplitRanking*> SplitRankings;
|
||||
};
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxStage : public UDTFluxEvent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
TArray<UDTFluxSplit*> Splits;
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
TArray<UDTFluxStageRanking*> StageRankings;
|
||||
};
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class DTFLUXCORE_API UDTFluxContest : public UDTFluxEvent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
int ContestID;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
TArray<UDTFluxContestRanking*> ContestRankings;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, Category="DTFlux|Model")
|
||||
TArray<UDTFluxStage*> Stages;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user