Commit v.2025

This commit is contained in:
2025-06-17 13:17:17 +02:00
parent d16693c85b
commit efae805ae1
50 changed files with 2123 additions and 0 deletions

View 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;
};

View 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;
};

View 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"),
};

View 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();
};

View File

@ -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:
};

View 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;
};

View 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;
};

View 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;
};

View 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;
};