2022-11-02 22:43:14 +01:00
|
|
|
/**
|
|
|
|
|
* @file
|
|
|
|
|
*
|
|
|
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
|
|
|
*
|
|
|
|
|
* @section LICENSE
|
|
|
|
|
*
|
|
|
|
|
* (The MIT License)
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2020 - 2022 SenseGlove
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
|
|
|
* copies or substantial portions of the Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
|
* SOFTWARE.
|
|
|
|
|
*
|
|
|
|
|
* @section DESCRIPTION
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
|
|
|
|
#include "SGTypes/SGCoreTypes.h"
|
|
|
|
|
|
|
|
|
|
#include "SGDeviceKismetLibrary.generated.h"
|
|
|
|
|
|
|
|
|
|
class USGDevice;
|
|
|
|
|
|
|
|
|
|
UCLASS(meta=(ScriptName = "SesneGloveSGDeviceKismetLibrary"))
|
|
|
|
|
class SENSEGLOVECOREKISMET_API USGDeviceKismetLibrary : public USGBlueprintFunctionLibrary
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | SGDevice")
|
2022-11-14 16:57:23 +01:00
|
|
|
static FString ToString_DT(ESGDeviceType DeviceType);
|
2022-11-02 22:43:14 +01:00
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static ESGDeviceType GetDeviceType(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static FString GetDeviceId(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static FString GetHardwareVersion(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static int32 GetFirmwareVersion(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static int32 GetSubFirmwareVersion(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static FString GetFirmwareString(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static FString GetAddress(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static bool IsConnected(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static ESGConnectionType GetConnectionType(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static int32 PacketsPerSecondReceived(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static int32 PacketsPerSecondSent(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static bool IsWireless(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static bool HasBattery(const USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static bool IsCharging(UPARAM(ref) USGDevice* SGDevice);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static bool GetBatteryLevel(UPARAM(ref) USGDevice* SGDevice, float& OutLevel);
|
|
|
|
|
|
2022-11-14 16:57:23 +01:00
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
|
|
|
|
static FString ToString(const USGDevice* SGDevice);
|
2022-11-02 22:43:14 +01:00
|
|
|
};
|