128 lines
3.5 KiB
C++
128 lines
3.5 KiB
C++
/**
|
|
* @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
|
|
*
|
|
*
|
|
*/
|
|
|
|
|
|
#include "SGCoreKismet/SGDeviceKismetLibrary.h"
|
|
|
|
#include "SGCore/SGDevice.h"
|
|
|
|
void USGDeviceKismetLibrary::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion)
|
|
{
|
|
return USGDevice::ParseFirmware(RawFirmware, OutMainVersion, OutSubVersion);
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::ToString_DT(const ESGDeviceType DeviceType)
|
|
{
|
|
return USGDevice::ToString(DeviceType);
|
|
}
|
|
|
|
ESGDeviceType USGDeviceKismetLibrary::GetDeviceType(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetDeviceType();
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::GetDeviceId(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetDeviceId();
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::GetHardwareVersion(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetHardwareVersion();
|
|
}
|
|
|
|
int32 USGDeviceKismetLibrary::GetFirmwareVersion(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetFirmwareVersion();
|
|
}
|
|
|
|
int32 USGDeviceKismetLibrary::GetSubFirmwareVersion(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetSubFirmwareVersion();
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::GetFirmwareString(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetFirmwareString();
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::GetAddress(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetAddress();
|
|
}
|
|
|
|
bool USGDeviceKismetLibrary::IsConnected(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->IsConnected();
|
|
}
|
|
|
|
ESGConnectionType USGDeviceKismetLibrary::GetConnectionType(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->GetConnectionType();
|
|
}
|
|
|
|
int32 USGDeviceKismetLibrary::PacketsPerSecondReceived(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->PacketsPerSecondReceived();
|
|
}
|
|
|
|
int32 USGDeviceKismetLibrary::PacketsPerSecondSent(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->PacketsPerSecondSent();
|
|
}
|
|
|
|
bool USGDeviceKismetLibrary::IsWireless(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->IsWireless();
|
|
}
|
|
|
|
bool USGDeviceKismetLibrary::HasBattery(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->HasBattery();
|
|
}
|
|
|
|
bool USGDeviceKismetLibrary::IsCharging(USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->IsCharging();
|
|
}
|
|
|
|
bool USGDeviceKismetLibrary::GetBatteryLevel(USGDevice* SGDevice, float& OutLevel)
|
|
{
|
|
return SGDevice->GetBatteryLevel(OutLevel);
|
|
}
|
|
|
|
FString USGDeviceKismetLibrary::ToString(const USGDevice* SGDevice)
|
|
{
|
|
return SGDevice->ToString();
|
|
} |