Lovense Integration
|
This class defines the plugin interface. Use FLovenseManager::Get() to get the global manager instance. More...
#include <LovenseIntegration/Source/LovenseIntegration/Public/LovenseManager.h>
Public Member Functions | |
void | StartLovense () |
Will start the integration. This includes: 1. Fetching config values. 2. Starting the heartbeat to update timers. 3. Notifying listeners that the integration has started. 4. Updating adapters. More... | |
void | StopLovense () |
Will stop the integration. This includes: 1. Stopping and resetting timers. 2. Clearing any currently running commands. 3. Clearing active and temporary data. 4. Stopping the heartbeat. 5. Notifying listeners that the integration has stopped. More... | |
void | UpdateAdapters () |
Will fetch all available lovense adapters and update toys. See top of header for a sequence diagram. | |
void | UpdateToys () |
Will fetch all available toys from the currently active lovense adapters. | |
void | ClearAllCommands (class ULovenseToy *toy=nullptr) |
Will command a single or all toys to set the speed of all functions to 0. More... | |
void | ReloadLovenseConfig () |
Loads the Lovense config ini from disk. Does not fetch data. | |
FORCEINLINE class ULovenseEvents * | GetLovenseEvents () |
const FORCEINLINE TArray< class ULovenseToy * > & | GetToys () |
FORCEINLINE bool | IsLovenseRunning () |
FORCEINLINE bool | IsUpdatingAdapters () |
FORCEINLINE bool | IsUpdatingToys () |
bool | IsIPStringValid (const FString &ipString, const TCHAR *delimiter=TEXT(".")) |
Checks if ipString is a valid IP. | |
bool | IsDomainStringValid (const FString &domainString) |
Checks if domainString is a valid .lovense.club domain. | |
bool | IsPortStringValid (const FString &portString) |
Checks if portString is a valid port. | |
FString | ConvertIPStringToDomainString (const FString &ipString) |
Will convert an IP string to a .lovense.club domain string (e.g. "123.123.123.123" -> "123-123-123-123.lovense.club") | |
FString | ConvertDomainStringToIPString (const FString &domainString) |
Will convert a .lovense.club domain string to an IP string (e.g. "123-123-123-123.lovense.club" -> "123.123.123.123") | |
void | StartTimer (FTimerHandle &timerHandle, float timerRate, bool bIsLooped) |
Wrapper function to start a timer on the timer manager without a delegate. | |
void | StartTimer (FTimerHandle &timerHandle, const FTimerDelegate &delegate, float timerRate, bool bIsLooped) |
Wrapper function to start a timer on the timer manager with a non-dynamic delegate. | |
void | StartTimer (FTimerHandle &timerHandle, const FTimerDynamicDelegate &delegate, float timerRate, bool bIsLooped) |
Wrapper function to start a timer on the timer manager with a dynamic delegate. | |
void | StopTimer (FTimerHandle &timerHandle) |
Wrapper function to clear a timer on the timer manager. | |
bool | IsTimerRunning (FTimerHandle timerHandle) |
Wrapper function to check if a timer is currently running. | |
bool | IsTimerExecuting (FTimerHandle timerHandle) |
Wrapper function to check if a timer has just finished and is currently executing its delegate. | |
bool | SendCommand (ELovenseCommand command, class ULovenseToy *toy, uint8 valueA=0, int32 time=0, uint8 valueB=0, uint8 valueC=0, const FString &presetName=TEXT(""), FLovensePattern pattern=FLovensePattern(), FOnLovenseResponse callback=FOnLovenseResponse()) |
Will send the specified command to a single or all available toys. More... | |
bool | SendCommand_Test (class ULovenseToy *toy) |
Makes a single or all available toys vibrate for 1.0 seconds to test connection. More... | |
bool | SendCommand_Stop (class ULovenseToy *toy) |
Stop all commands a single or all available toys might be executing. More... | |
bool | SendCommand_Vibrate (class ULovenseToy *toy, uint8 vibrationSpeed) |
Set vibration speed on a single or all available toys. More... | |
bool | SendCommand_Vibrate1 (class ULovenseToy *toy, uint8 vibrationSpeed) |
Set vibration speed of motor 1 on a single or all available toys. More... | |
bool | SendCommand_Vibrate2 (class ULovenseToy *toy, uint8 vibrationSpeed) |
Set vibration speed of motor 2 on a single or all available toys. More... | |
bool | SendCommand_Rotate (class ULovenseToy *toy, uint8 rotationSpeed) |
Set rotation speed on a single or all available toys. More... | |
bool | SendCommand_RotateAntiClockwise (class ULovenseToy *toy, uint8 rotationSpeed) |
Like SendCommand_Rotate(), but specifies the rotation direction to be anti-clockwise. More... | |
bool | SendCommand_RotateClockwise (class ULovenseToy *toy, uint8 rotationSpeed) |
Like SendCommand_Rotate(), but specifies the rotation direction to be clockwise. More... | |
bool | SendCommand_RotateChange (class ULovenseToy *toy) |
Toggles the rotation direction between clockwise and anti-clockwise on a single or all available toys. More... | |
bool | SendCommand_AirAuto (class ULovenseToy *toy, uint8 pulseSpeed) |
Set air pulse speed on a single or all available toys. More... | |
bool | SendCommand_AirIn (class ULovenseToy *toy) |
Will pump in air on a single or all available toys. More... | |
bool | SendCommand_AirOut (class ULovenseToy *toy) |
Will pump out air on a single or all available toys. More... | |
bool | SendCommand_Thrust (class ULovenseToy *toy, uint8 thrustingSpeed) |
Set thrusting speed on a single or all available toys. More... | |
bool | SendCommand_Suck (class ULovenseToy *toy, uint8 suctionSpeed) |
Set suction speed on a single or all available toys. More... | |
bool | SendCommand_Finger (class ULovenseToy *toy, uint8 fingeringSpeed) |
Set fingering speed on a single or all available toys. More... | |
bool | SendCommand_Preset (class ULovenseToy *toy, uint8 pattern) |
Set vibration pattern on a single or all available toys. More... | |
bool | SendCommand_Battery (class ULovenseToy *toy, FOnLovenseResponse callback) |
Fetch the battery status of a toy. More... | |
bool | SendCommand_AVibrate (class ULovenseToy *toy, uint8 vibrationSpeed, int32 time) |
Set vibration speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AVibrate1 (class ULovenseToy *toy, uint8 vibrationSpeed, int32 time) |
Set vibration speed of motor 1 on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AVibrate2 (class ULovenseToy *toy, uint8 vibrationSpeed, int32 time) |
Set vibration speed of motor 2 on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_ARotate (class ULovenseToy *toy, uint8 rotationSpeed, int32 time) |
Set rotation speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AAirLevel (class ULovenseToy *toy, uint8 pulseSpeed, int32 time) |
Set air pulse speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AThrust (class ULovenseToy *toy, uint8 thrustingSpeed, int32 time) |
Set thrusting speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_ASuck (class ULovenseToy *toy, uint8 suctionSpeed, int32 time) |
Set suction speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AFinger (class ULovenseToy *toy, uint8 fingeringSpeed, int32 time) |
Set fingering speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_APreset (class ULovenseToy *toy, const FString &patternName, int32 time) |
Set preset on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AVibRotate (class ULovenseToy *toy, uint8 vibrationSpeed, uint8 rotationSpeed, int32 time) |
Set vibration and rotation speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AVibAir (class ULovenseToy *toy, uint8 vibrationSpeed, uint8 pulseSpeed, int32 time) |
Set vibration and air pulse speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AVibRotateAir (class ULovenseToy *toy, uint8 vibrationSpeed, uint8 rotationSpeed, uint8 pulseSpeed, int32 time) |
Set vibration, rotation and air pulse speed on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_AAll (class ULovenseToy *toy, uint8 speed, int32 time) |
Set all function speeds on a single or all available toys for a certain amount of time. More... | |
bool | SendCommand_Pattern (class ULovenseToy *toy, FLovensePattern &pattern) |
Play a pattern of vibration, rotation, air pulse, thrusting, suction and/or fingering speeds on a single or all available toys for a certain amount of time. More... | |
template<typename TCallback > | |
FORCEINLINE void | ForEachAdapter (TCallback callback) |
Iterates over all active adapters. | |
void | OnCommandFailed () |
Called when a SendCommand_*() HTTP request or UpdateToys() failed. Will reset the Update Adapters Timer and tries to update adapters. See top of header for an activity diagram showing the Update Adapters Timer loop. The timer loop will run until ResetUpdateAdaptersTimer() is called. Commands can fail for these reasons (not exhaustive): 1. User disconnects toy(s). 2. User closes Lovense App. 3. User exits game mode/disables remote control in the Lovense App. 4. The device the Lovense App is running on loses network connection. | |
FORCEINLINE int32 | GetToyDelay () |
Get the cached "ToyDelay" config value. Toy delay is in milliseconds. Value range is 0-2000ms and defaults to 500ms. The toy delay adjusts the start time for pattern generation based on animations. (See ULovenseToyAnimationControlComponent) | |
FORCEINLINE void | SetToyDelay (int32 value) |
Set the cached "ToyDelay" config value. Toy delay is in milliseconds. Value range is 0-2000ms and defaults to 500ms. The toy delay adjusts the start time for pattern generation based on animations. (See ULovenseToyAnimationControlComponent) Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyDelay() instead, which will call this. | |
FORCEINLINE float | GetToyStrengthMultiplier () |
Get the cached "ToyStrengthMultiplier" config value. Value range is 0.0f-1.0f and defaults to 1.0f. The toy strength multiplier scales the speed values before commands are sent. | |
FORCEINLINE void | SetToyStrengthMultiplier (float value) |
Set the cached "ToyStrengthMultiplier" config value. Value range is 0.0f-1.0f and defaults to 1.0f. The toy strength multiplier scales the speed values before commands are sent. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyStrengthMultiplier() instead, which will call this. | |
FORCEINLINE bool | GetToyVibrationEnabled () |
Get the cached "ToyVibrationEnabled" config value. If false, vibration speed values will be set to 0 before commands are sent, so toys will not vibrate. Defaults to true. | |
void | SetToyVibrationEnabled (bool value) |
Set the cached "ToyVibrationEnabled" config value. If false, vibration speed values will be set to 0 before commands are sent, so toys will not vibrate. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyVibrationEnabled() instead, which will call this. More... | |
FORCEINLINE bool | GetToyRotationEnabled () |
Get the cached "ToyRotationEnabled" config value. If false, rotation speed values will be set to 0 before commands are sent, so toys will not rotate. Defaults to true. | |
void | SetToyRotationEnabled (bool value) |
Set the cached "ToyRotationEnabled" config value. If false, rotation speed values will be set to 0 before commands are sent, so toys will not rotate. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyRotationEnabled() instead, which will call this. More... | |
FORCEINLINE bool | GetToyAirEnabled () |
Get the cached "ToyAirEnabled" config value. If false, air speed values will be set to 0 before commands are sent, so toys will not pump. Defaults to true. | |
void | SetToyAirEnabled (bool value) |
Set the cached "ToyAirEnabled" config value. If false, air speed values will be set to 0 before commands are sent, so toys will not pump. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyAirEnabled() instead, which will call this. More... | |
FORCEINLINE bool | GetToyThrustingEnabled () |
Get the cached "ToyThrustingEnabled" config value. If false, thrusting speed values will be set to 0 before commands are sent, so toys will not thrust. Defaults to true. | |
void | SetToyThrustingEnabled (bool value) |
Set the cached "ToyVibrationEnabled" config value. If false, thrusting speed values will be set to 0 before commands are sent, so toys will not thrust. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyThrustingEnabled() instead, which will call this. More... | |
FORCEINLINE bool | GetToySuctionEnabled () |
Get the cached "ToySuctionEnabled" config value. If false, suction speed values will be set to 0 before commands are sent, so toys will not suck. Defaults to true. | |
void | SetToySuctionEnabled (bool value) |
Set the cached "ToySuctionEnabled" config value. If false, suction speed values will be set to 0 before commands are sent, so toys will not suck. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToySuctionEnabled() instead, which will call this. More... | |
FORCEINLINE bool | GetToyFingeringEnabled () |
Get the cached "ToyFingeringEnabled" config value. If false, fingering speed values will be set to 0 before commands are sent, so toys will not finger. Defaults to true. | |
void | SetToyFingeringEnabled (bool value) |
Set the cached "ToyFingeringEnabled" config value. If false, fingering speed values will be set to 0 before commands are sent, so toys will not finger. Defaults to true. Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyFingeringEnabled() instead, which will call this. More... | |
const FORCEINLINE FLovenseCommandDelayTimers & | GetCommandDelayTimers () |
Get the global set of Command Delay Timers used when commands are broadcasted. See FLovenseCommandDelayTimers for more information. | |
Static Public Member Functions | |
static FLovenseManager * | Get () |
Get the instance of the lovense manager. Always valid. | |
Friends | |
class | FLovenseIntegrationModule |
This class defines the plugin interface. Use FLovenseManager::Get() to get the global manager instance.
void FLovenseManager::ClearAllCommands | ( | class ULovenseToy * | toy = nullptr | ) |
Will command a single or all toys to set the speed of all functions to 0.
toy | Specifies the toy commands should be cleared on. Can be nullptr, in that case commands are cleared on all available toys. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool FLovenseManager::SendCommand | ( | ELovenseCommand | command, |
class ULovenseToy * | toy, | ||
uint8 | valueA = 0 , |
||
int32 | time = 0 , |
||
uint8 | valueB = 0 , |
||
uint8 | valueC = 0 , |
||
const FString & | presetName = TEXT("") , |
||
FLovensePattern | pattern = FLovensePattern() , |
||
FOnLovenseResponse | callback = FOnLovenseResponse() |
||
) |
Will send the specified command to a single or all available toys.
command | The command to be sent. |
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
valueA | Not relevant for the Test, RotateChange, AirIn, AirOut and Battery command. The speed of the function. Valid range is 0-20, 0 meaning off. |
time | Only relevant for the A* commands. Time in seconds for how long the command should run. Only full seconds are supported. |
valueB | Only relevant for the AVibRotate AVibAir commands. For AVibRotate: The speed of the rotation. Valid range is 0-20, 0 meaning off. For AVibAir: The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
valueC | Only relevant for the AVibRotateAir command. The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
presetName | Only relevant for the APreset command. The name of the pattern. Valid names are "pulse", "wave", "fireworks", "earthquake". Leave empty to stop. |
pattern | Only relevant for the Pattern command. The data defining the pattern. See FLovensePattern for more information. |
callback | Only relevant for the Battery command. |
bool FLovenseManager::SendCommand_AAirLevel | ( | class ULovenseToy * | toy, |
uint8 | pulseSpeed, | ||
int32 | time | ||
) |
Set air pulse speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
pulseSpeed | The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AAll | ( | class ULovenseToy * | toy, |
uint8 | speed, | ||
int32 | time | ||
) |
Set all function speeds on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
speed | The speed of all functions. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. |
bool FLovenseManager::SendCommand_AFinger | ( | class ULovenseToy * | toy, |
uint8 | fingeringSpeed, | ||
int32 | time | ||
) |
Set fingering speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
fingeringSpeed | The speed of the fingering. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AirAuto | ( | class ULovenseToy * | toy, |
uint8 | pulseSpeed | ||
) |
Set air pulse speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
pulseSpeed | The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
bool FLovenseManager::SendCommand_AirIn | ( | class ULovenseToy * | toy | ) |
Will pump in air on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
bool FLovenseManager::SendCommand_AirOut | ( | class ULovenseToy * | toy | ) |
Will pump out air on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
bool FLovenseManager::SendCommand_APreset | ( | class ULovenseToy * | toy, |
const FString & | patternName, | ||
int32 | time | ||
) |
Set preset on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
patternName | The name of the pattern. Valid names are "pulse", "wave", "fireworks", "earthquake". Leave empty to stop. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_ARotate | ( | class ULovenseToy * | toy, |
uint8 | rotationSpeed, | ||
int32 | time | ||
) |
Set rotation speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_ASuck | ( | class ULovenseToy * | toy, |
uint8 | suctionSpeed, | ||
int32 | time | ||
) |
Set suction speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
suctionSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AThrust | ( | class ULovenseToy * | toy, |
uint8 | thrustingSpeed, | ||
int32 | time | ||
) |
Set thrusting speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
thrustingSpeed | The speed of the thrusting. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibAir | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
uint8 | pulseSpeed, | ||
int32 | time | ||
) |
Set vibration and air pulse speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
pulseSpeed | The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibrate | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
int32 | time | ||
) |
Set vibration speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibrate1 | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
int32 | time | ||
) |
Set vibration speed of motor 1 on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibrate2 | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
int32 | time | ||
) |
Set vibration speed of motor 2 on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibRotate | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
uint8 | rotationSpeed, | ||
int32 | time | ||
) |
Set vibration and rotation speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. Note The Lovense Connect app only has one global timer, meaning if an A* command is sent to a toy while another toy on the same adapter is currently running an A* command, that other toy will be interrupted. |
bool FLovenseManager::SendCommand_AVibRotateAir | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed, | ||
uint8 | rotationSpeed, | ||
uint8 | pulseSpeed, | ||
int32 | time | ||
) |
Set vibration, rotation and air pulse speed on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
pulseSpeed | The speed of the air pulsation. Valid range is 0-3, 0 meaning off. |
time | Time in seconds for how long the command should run. Only full seconds are supported. |
bool FLovenseManager::SendCommand_Battery | ( | class ULovenseToy * | toy, |
FOnLovenseResponse | callback | ||
) |
Fetch the battery status of a toy.
toy | Specifies the toy the command is sent to. Needs a valid toy. |
callback | Executed once the battery status has been received. Event has an int32 parameter indicating the battery level. Value range is -1-100, -1 meaning the battery status could not be fetched. |
bool FLovenseManager::SendCommand_Finger | ( | class ULovenseToy * | toy, |
uint8 | fingeringSpeed | ||
) |
Set fingering speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
fingeringSpeed | The speed of the fingering. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Pattern | ( | class ULovenseToy * | toy, |
FLovensePattern & | pattern | ||
) |
Play a pattern of vibration, rotation, air pulse, thrusting, suction and/or fingering speeds on a single or all available toys for a certain amount of time.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
pattern | The data defining the pattern. See FLovensePattern for more information. |
bool FLovenseManager::SendCommand_Preset | ( | class ULovenseToy * | toy, |
uint8 | pattern | ||
) |
Set vibration pattern on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
pattern | The vibration pattern. Valid range is 0-3, 0 meaning off. |
bool FLovenseManager::SendCommand_Rotate | ( | class ULovenseToy * | toy, |
uint8 | rotationSpeed | ||
) |
Set rotation speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_RotateAntiClockwise | ( | class ULovenseToy * | toy, |
uint8 | rotationSpeed | ||
) |
Like SendCommand_Rotate(), but specifies the rotation direction to be anti-clockwise.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_RotateChange | ( | class ULovenseToy * | toy | ) |
Toggles the rotation direction between clockwise and anti-clockwise on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
bool FLovenseManager::SendCommand_RotateClockwise | ( | class ULovenseToy * | toy, |
uint8 | rotationSpeed | ||
) |
Like SendCommand_Rotate(), but specifies the rotation direction to be clockwise.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
rotationSpeed | The speed of the rotation. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Stop | ( | class ULovenseToy * | toy | ) |
Stop all commands a single or all available toys might be executing.
bool FLovenseManager::SendCommand_Suck | ( | class ULovenseToy * | toy, |
uint8 | suctionSpeed | ||
) |
Set suction speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
suctionSpeed | The speed of the suction. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Test | ( | class ULovenseToy * | toy | ) |
Makes a single or all available toys vibrate for 1.0 seconds to test connection.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
bool FLovenseManager::SendCommand_Thrust | ( | class ULovenseToy * | toy, |
uint8 | thrustingSpeed | ||
) |
Set thrusting speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
thrustingSpeed | The speed of the thrusting. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Vibrate | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed | ||
) |
Set vibration speed on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Vibrate1 | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed | ||
) |
Set vibration speed of motor 1 on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
bool FLovenseManager::SendCommand_Vibrate2 | ( | class ULovenseToy * | toy, |
uint8 | vibrationSpeed | ||
) |
Set vibration speed of motor 2 on a single or all available toys.
toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys. |
vibrationSpeed | The speed of the vibration. Valid range is 0-20, 0 meaning off. |
void FLovenseManager::SetToyAirEnabled | ( | bool | value | ) |
Set the cached "ToyAirEnabled" config value.
If false, air speed values will be set to 0 before commands are sent, so toys will not pump. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyAirEnabled() instead, which will call this.
void FLovenseManager::SetToyFingeringEnabled | ( | bool | value | ) |
Set the cached "ToyFingeringEnabled" config value.
If false, fingering speed values will be set to 0 before commands are sent, so toys will not finger. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyFingeringEnabled() instead, which will call this.
void FLovenseManager::SetToyRotationEnabled | ( | bool | value | ) |
Set the cached "ToyRotationEnabled" config value.
If false, rotation speed values will be set to 0 before commands are sent, so toys will not rotate. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyRotationEnabled() instead, which will call this.
void FLovenseManager::SetToySuctionEnabled | ( | bool | value | ) |
Set the cached "ToySuctionEnabled" config value.
If false, suction speed values will be set to 0 before commands are sent, so toys will not suck. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToySuctionEnabled() instead, which will call this.
void FLovenseManager::SetToyThrustingEnabled | ( | bool | value | ) |
Set the cached "ToyVibrationEnabled" config value.
If false, thrusting speed values will be set to 0 before commands are sent, so toys will not thrust. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyThrustingEnabled() instead, which will call this.
void FLovenseManager::SetToyVibrationEnabled | ( | bool | value | ) |
Set the cached "ToyVibrationEnabled" config value.
If false, vibration speed values will be set to 0 before commands are sent, so toys will not vibrate. Defaults to true.
Warning - This only sets the cached value and will not update the config! Use ULovenseFunctionLibrary::SetToyVibrationEnabled() instead, which will call this.
void FLovenseManager::StartLovense | ( | ) |
Will start the integration. This includes:
1. Fetching config values.
2. Starting the heartbeat to update timers.
3. Notifying listeners that the integration has started.
4. Updating adapters.
void FLovenseManager::StopLovense | ( | ) |
Will stop the integration. This includes:
1. Stopping and resetting timers.
2. Clearing any currently running commands.
3. Clearing active and temporary data.
4. Stopping the heartbeat.
5. Notifying listeners that the integration has stopped.