Lovense Integration: ULovenseFunctionLibrary Class Reference

Lovense Integration

Public Member Functions | Static Public Member Functions | List of all members
ULovenseFunctionLibrary Class Reference

Blueprint exposed wrapper library for the Lovense Manager. More...

`#include <LovenseIntegration/Source/LovenseIntegration/Public/LovenseFunctionLibrary.h>`

Inheritance diagram for ULovenseFunctionLibrary:

## Public Member Functions

| ULovenseFunctionLibrary (const FObjectInitializer &ObjectInitializer)

## Static Public Member Functions

static void | Initialize ()

Will generate the lovense config file and automatically start the integration if "StartWithLovenseActive" config is true.
Usually gets called automatically in StartupModule(), but you can set the cvar "li.Initialization.Automatic" to false if you want to manually initialize.
It's safe to call this even if the integration is already running.

static 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...

static 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...

static void | UpdateAdapters ()
| Will fetch all available lovense adapters and update toys.
static void | UpdateToys ()
| Will fetch all available toys from the currently active lovense adapters.
static bool | IsLovenseRunning ()
| Whether the integration is currently running.
static bool | IsUpdatingAdapters ()
| Whether the lovense adapters are currently being updated.
static bool | IsUpdatingToys ()
| Whether the toys are currently being updated.
static const TArray< class ULovenseToy * > & | GetToys ()
| All currently available toys. Warning - If you cache these, make sure to subscribe to ULovenseEvents::onLovenseUpdatedToys and re-get them, as the toy objects will have been destroyed.
static void | ClearAllCommands (class ULovenseToy *toy=nullptr)
| Will command a single or all toys to set the speed of all functions to 0. More...
static bool | SendCommand (ELovenseCommand command, class ULovenseToy *toy, uint8 valueA, int32 time, uint8 valueB, uint8 valueC, const FString &presetName, const FLovensePattern &pattern, FOnLovenseResponseDynamic callback)
| Will send the specified command to a single or all available toys. More...
static bool | SendCommand_Test (class ULovenseToy *toy)
| Makes a single or all available toys vibrate for 1.0 seconds to test connection. More...
static bool | SendCommand_Stop (class ULovenseToy *toy)
| Stop all commands a single or all available toys might be executing. More...
static bool | SendCommand_Vibrate (class ULovenseToy *toy, uint8 vibrationSpeed)
| Set vibration speed on a single or all available toys. More...
static bool | SendCommand_Vibrate1 (class ULovenseToy *toy, uint8 vibrationSpeed)
| Set vibration speed of motor 1 on a single or all available toys. More...
static bool | SendCommand_Vibrate2 (class ULovenseToy *toy, uint8 vibrationSpeed)
| Set vibration speed of motor 2 on a single or all available toys. More...
static bool | SendCommand_Rotate (class ULovenseToy *toy, uint8 rotationSpeed)
| Set rotation speed on a single or all available toys. More...
static bool | SendCommand_RotateAntiClockwise (class ULovenseToy *toy, uint8 rotationSpeed)
| Like SendCommand_Rotate(), but specifies the rotation direction to be anti-clockwise. More...
static bool | SendCommand_RotateClockwise (class ULovenseToy *toy, uint8 rotationSpeed)
| Like SendCommand_Rotate(), but specifies the rotation direction to be clockwise. More...
static bool | SendCommand_RotateChange (class ULovenseToy *toy)
| Toggles the rotation direction between clockwise and anti-clockwise on a single or all available toys. More...
static bool | SendCommand_AirAuto (class ULovenseToy *toy, uint8 pulseSpeed)
| Set air pulse speed on a single or all available toys. More...
static bool | SendCommand_AirIn (class ULovenseToy *toy)
| Will pump in air on a single or all available toys. More...
static bool | SendCommand_AirOut (class ULovenseToy *toy)
| Will pump out air on a single or all available toys. More...
static bool | SendCommand_Thrust (class ULovenseToy *toy, uint8 thrustingSpeed)
| Set thrusting speed on a single or all available toys. More...
static bool | SendCommand_Suck (class ULovenseToy *toy, uint8 suctionSpeed)
| Set suction speed on a single or all available toys. More...
static bool | SendCommand_Finger (class ULovenseToy *toy, uint8 fingeringSpeed)
| Set fingering speed on a single or all available toys. More...
static bool | SendCommand_Preset (class ULovenseToy *toy, uint8 pattern)
| Set vibration pattern on a single or all available toys. More...
static bool | SendCommand_Battery (class ULovenseToy *toy, FOnLovenseResponseDynamic callback)
| Fetch the battery status of a toy. More...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static 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...
static bool | SendCommand_Pattern (class ULovenseToy *toy, const TArray< int32 > &pattern, bool bVibrate=true, bool bRotate=true, bool bPump=true, bool bThrust=true, bool bSuck=true, bool bFinger=true, int32 interval=100, int32 time=1)
| 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...
static class ULovenseEvents * | GetLovenseEvents ()
| Object holding global Lovense Integration delegates.
static bool | GetStartWithLovenseActive ()
| Fetch the config value "StartWithLovenseActive" from config. If true, lovense will be started on StartupModule(). Defaults to false.
static FString | GetDeviceIpOverride ()
| Fetch the config value "DeviceIpOverride" from config. If this ip is valid, it will be used to connect with the adapters.
static FString | GetDevicePortOverride ()
| Fetch the config value "DevicePortOverride" from config. If this port is valid, it will be used to connect with the adapters.
static 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)
static 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.
static 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.
static 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.
static 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.
static 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.
static 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.
static 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.
static bool | IsIPStringValid (const FString &ipString)
| Checks if ipString is a valid IP.
static bool | IsPortStringValid (const FString &portString)
| Checks if portString is a valid port.
static void | SetStartWithLovenseActive (bool bStartActive)
| Write the config value "StartWithLovenseActive" to config. If true, lovense will be started on StartupModule(). Defaults to false.
static void | SetDeviceIpOverride (const FString &ipOverride)
| Write the config value "DeviceIpOverride" to config. If this ip is valid, it will be used to connect with the adapters.
static void | SetDevicePortOverride (const FString &portOverride)
| Write the config value "DevicePortOverride" to config. If this port is valid, it will be used to connect with the adapters.
static void | SetToyDelay (int32 value)

Set cached "ToyDelay" config value and write it to config.
Toy delay is in milliseconds. Value range is 0-2000ms and defaults to 500ms.
The value only gets clamped on load, so caller should make sure it is in range.
The toy delay adjusts the start time for pattern generation based on animations. (See ULovenseToyAnimationControlComponent)

static void | SetToyStrengthMultiplier (float value)

Set cached "ToyStrengthMultiplier" config value and write it to config.
Value range is 0.0f-1.0f and defaults to 1.0f.
The value only gets clamped on load, so caller should make sure it is in range.
The toy strength multiplier scales the speed values before commands are sent.

static void | SetToyVibrationEnabled (bool value)
| Set cached "ToyVibration" config value and write it to config. If false, vibration speed values will be set to 0 before commands are sent, so toys will not vibrate. Defaults to true;. More...
static void | SetToyRotationEnabled (bool value)
| Set cached "ToyRotation" config value and write it to config. If false, rotation speed values will be set to 0 before commands are sent, so toys will not rotate. Defaults to true;. More...
static void | SetToyAirEnabled (bool value)
| Set cached "ToyAir" config value and write it to config. If false, air speed values will be set to 0 before commands are sent, so toys will not pump. Defaults to true;. More...
static void | SetToyThrustingEnabled (bool value)
| Set cached "ToyThrusting" config value and write it to config. If false, thrusting speed values will be set to 0 before commands are sent, so toys will not thrust. Defaults to true;. More...
static void | SetToySuctionEnabled (bool value)
| Set cached "ToySuction" config value and write it to config. If false, suction speed values will be set to 0 before commands are sent, so toys will not suck. Defaults to true;. More...
static void | SetToyFingeringEnabled (bool value)
| Set cached "ToyFingering" config value and write it to config. If false, fingering speed values will be set to 0 before commands are sent, so toys will not finger. Defaults to true;. More...

## Detailed Description

Blueprint exposed wrapper library for the Lovense Manager.

## Member Function Documentation

## ◆ ClearAllCommands()

void ULovenseFunctionLibrary::ClearAllCommands | ( | class ULovenseToy * | toy = `nullptr` | ) |

static

Will command a single or all toys to set the speed of all functions to 0.

Parameters

  toy | Specifies the toy commands should be cleared on. Can be nullptr, in that case commands are cleared on all available toys.

## ◆ SendCommand()

bool ULovenseFunctionLibrary::SendCommand | ( | ELovenseCommand | command,
|  | class ULovenseToy * | toy,
|  | uint8 | valueA,
|  | int32 | time,
|  | uint8 | valueB,
|  | uint8 | valueC,
|  | const FString & | presetName,
|  | const FLovensePattern & | pattern,
|  | FOnLovenseResponseDynamic | callback
| ) |  |

static

Will send the specified command to a single or all available toys.

Note
  See the respective SendCommand_*() functions for more information on the respective commands.

Parameters

  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 vibration. 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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AAirLevel()

bool ULovenseFunctionLibrary::SendCommand_AAirLevel | ( | class ULovenseToy * | toy,
|  | uint8 | pulseSpeed,
|  | int32 | time
| ) |  |

static

Set air pulse speed on a single or all available toys for a certain amount of time.

Note
  This command only works for the Max toy.
  The pulsing will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AirAuto, AirIn, AirOut and AVibAir commands.
  The cooldown will be ignored for calls with pulseSpeed = 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AAll()

bool ULovenseFunctionLibrary::SendCommand_AAll | ( | class ULovenseToy * | toy,
|  | uint8 | speed,
|  | int32 | time
| ) |  |

static

Set all function speeds on a single or all available toys for a certain amount of time.

Note
  All functions will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds.
  If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown will be ignored for calls with speed = 0.
  Only works with Lovense Remote.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AFinger()

bool ULovenseFunctionLibrary::SendCommand_AFinger | ( | class ULovenseToy * | toy,
|  | uint8 | fingeringSpeed,
|  | int32 | time
| ) |  |

static

Set fingering speed on a single or all available toys for a certain amount of time.

Note
  The fingering will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Finger command.
  The cooldown will be ignored for calls with fingeringSpeed = 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AirAuto()

bool ULovenseFunctionLibrary::SendCommand_AirAuto | ( | class ULovenseToy * | toy,
|  | uint8 | pulseSpeed
| ) |  |

static

Set air pulse speed on a single or all available toys.

Note
  This command only works for the Max toy.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AirIn, AirOut, AAirLevel and AVibAir commands.
  The cooldown will be ignored for calls with pulseSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AirIn()

bool ULovenseFunctionLibrary::SendCommand_AirIn | ( | class ULovenseToy * | toy | ) |

static

Will pump in air on a single or all available toys.

Note
  This command only works for the Max toy.
  The Max toy can only pump air for 3.0 seconds. If the toy is full of air, the command will be ignored.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AirAuto, AirOut, AAirLevel and AVibAir commands.
  Only works with Lovense Connect.

Parameters

  toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AirOut()

bool ULovenseFunctionLibrary::SendCommand_AirOut | ( | class ULovenseToy * | toy | ) |

static

Will pump out air on a single or all available toys.

Note
  This command only works for the Max toy.
  If the Max toy is out of air, the command will be ignored.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AirAuto, AirIn, AAirLevel and AVibAir commands.
  Only works with Lovense Connect.

Parameters

  toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_APreset()

bool ULovenseFunctionLibrary::SendCommand_APreset | ( | class ULovenseToy * | toy,
|  | const FString & | patternName,
|  | int32 | time
| ) |  |

static

Set preset on a single or all available toys for a certain amount of time.

Note
  The preset will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Preset command.
  The cooldown will be ignored for calls with empty patternName.
  Only works with Lovense Remote.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_ARotate()

bool ULovenseFunctionLibrary::SendCommand_ARotate | ( | class ULovenseToy * | toy,
|  | uint8 | rotationSpeed,
|  | int32 | time
| ) |  |

static

Set rotation speed on a single or all available toys for a certain amount of time.

Note
  This command only works for the Nora toy.
  The rotation will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Rotate, RotateAntiClockwise, RotateClockwise, RotateChange and AVibRotate commands.
  The cooldown will be ignored for calls with rotationSpeed = 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_ASuck()

bool ULovenseFunctionLibrary::SendCommand_ASuck | ( | class ULovenseToy * | toy,
|  | uint8 | suctionSpeed,
|  | int32 | time
| ) |  |

static

Set suction speed on a single or all available toys for a certain amount of time.

Note
  The suction will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Suck command.
  The cooldown will be ignored for calls with suctionSpeed = 0.

Parameters

  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.
  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AThrust()

bool ULovenseFunctionLibrary::SendCommand_AThrust | ( | class ULovenseToy * | toy,
|  | uint8 | thrustingSpeed,
|  | int32 | time
| ) |  |

static

Set thrusting speed on a single or all available toys for a certain amount of time.

Note
  The thrusting will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Thrust command.
  The cooldown will be ignored for calls with thrustingSpeed = 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibAir()

bool ULovenseFunctionLibrary::SendCommand_AVibAir | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | uint8 | pulseSpeed,
|  | int32 | time
| ) |  |

static

Set vibration and air pulse speed on a single or all available toys for a certain amount of time.

Note
  This command only works for the Max toy.
  The vibration and pulsing will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds for the vibration and 1.0 seconds for the air pulsation.
  If this command is sent again before both cooldowns are over, that call will be ignored.
  The vibration cooldown for this command is shared with the Vibrate, AVibrate and AVibAir commands.
  The air pulsation cooldown for this command is shared with the AirAuto, AirIn, AirOut and AAirLevel commands.
  The cooldown will be ignored for calls with vibrationSpeed = 0 or pulseSpeed = 0.
  Warning - If only one of the speed parameters is 0, the cooldown will be circumvented for the speed parameter that is not 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibrate()

bool ULovenseFunctionLibrary::SendCommand_AVibrate | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | int32 | time
| ) |  |

static

Set vibration speed on a single or all available toys for a certain amount of time.

Note
  The vibration will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Vibrate, AVibRotate and AVibAir commands.
  The cooldown will be ignored for calls with vibrationSpeed = 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibrate1()

bool ULovenseFunctionLibrary::SendCommand_AVibrate1 | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | int32 | time
| ) |  |

static

Set vibration speed of motor 1 on a single or all available toys for a certain amount of time.

Note
  This command only works for the Edge toy.
  The vibration will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Vibrate1 command.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibrate2()

bool ULovenseFunctionLibrary::SendCommand_AVibrate2 | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | int32 | time
| ) |  |

static

Set vibration speed of motor 2 on a single or all available toys for a certain amount of time.

Note
  This command only works for the Edge toy.
  The vibration will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Vibrate2 command.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibRotate()

bool ULovenseFunctionLibrary::SendCommand_AVibRotate | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | uint8 | rotationSpeed,
|  | int32 | time
| ) |  |

static

Set vibration and rotation speed on a single or all available toys for a certain amount of time.

Note
  This command only works for the Nora toy.
  The vibration and rotation will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds for the vibration and 1.0 seconds for the rotation.
  If this command is sent again before both cooldowns are over, that call will be ignored.
  The vibration cooldown for this command is shared with the Vibrate, AVibrate and AVibAir commands.
  The rotation cooldown for this command is shared with the Rotate, RotateAntiClockwise, RotateClockwise, RotateChange and ARotate commands.
  The cooldown will be ignored for calls with vibrationSpeed = 0 or rotationSpeed = 0.
  Warning - If only one of the speed parameters is 0, the cooldown will be circumvented for the speed parameter that is not 0.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_AVibRotateAir()

bool ULovenseFunctionLibrary::SendCommand_AVibRotateAir | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed,
|  | uint8 | rotationSpeed,
|  | uint8 | pulseSpeed,
|  | int32 | time
| ) |  |

static

Set vibration, rotation and air pulse speed on a single or all available toys for a certain amount of time.

Note
  The vibration, rotation and pulsing will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.2 seconds.
  If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Remote.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Battery()

bool ULovenseFunctionLibrary::SendCommand_Battery | ( | class ULovenseToy * | toy,
|  | FOnLovenseResponseDynamic | callback
| ) |  |

static

Fetch the battery status of a toy.

Note
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AVibrate, AVibRotate and AVibAir commands.
  The cooldown will be ignored for calls with vibrationSpeed = 0.

Parameters

  toy | Specifies the toy the command is sent to. Needs a valid toy.
  callback | Executed once the battery status has been received. Event has two parameters: - A ULovenseToy parameter with the toy this command was called with. - An int32 parameter indicating the battery level. Value range is -1-100, -1 meaning the battery status could not be fetched.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Finger()

bool ULovenseFunctionLibrary::SendCommand_Finger | ( | class ULovenseToy * | toy,
|  | uint8 | fingeringSpeed
| ) |  |

static

Set fingering speed on a single or all available toys.

Note
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AFinger command.
  The cooldown will be ignored for calls with fingeringSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Pattern()

bool ULovenseFunctionLibrary::SendCommand_Pattern | ( | class ULovenseToy * | toy,
|  | const TArray< int32 > & | pattern,
|  | bool | bVibrate = `true`,
|  | bool | bRotate = `true`,
|  | bool | bPump = `true`,
|  | bool | bThrust = `true`,
|  | bool | bSuck = `true`,
|  | bool | bFinger = `true`,
|  | int32 | interval = `100`,
|  | int32 | time = `1`
| ) |  |

static

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.

Note
  The pattern will automatically stop after the specified time has passed.
  If the command is sent again before the specified time has passed, the currently running command will be overwritten.
  This command has a cooldown of 0.1 seconds.
  If this command is sent again before the cooldown is over, that call will be ignored.
  Only works with Lovense Remote.

Parameters

  toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys.
  pattern | Array of toy speed values (0-20) that constitutes the pattern. Maximum number of values is 50.
  bVibrate | Whether the pattern will make the toy vibrate. (Might be overridden by user config "ToyVibration")
  bRotate | Whether the pattern will make the toy rotate. (Might be overridden by user config "ToyRotation")
  bPump | Whether the pattern will make the toy pump. (Might be overridden by user config "ToyAir")
  bThrust | Whether the pattern will make the toy thrust. (Might be overridden by user config "ToyThrusting")
  bSuck | Whether the pattern will make the toy suck. (Might be overridden by user config "ToySuction")
  bFinger | Whether the pattern will make the toy finger. (Might be overridden by user config "ToyFingering")
  interval | The interval in milliseconds the pattern will be played at. Minimum interval is 100.
  time | The time in seconds the pattern will play for. If 0, the pattern will play indefinitely, otherwise should be >=1.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Preset()

bool ULovenseFunctionLibrary::SendCommand_Preset | ( | class ULovenseToy * | toy,
|  | uint8 | pattern
| ) |  |

static

Set vibration pattern on a single or all available toys.

Note
  This command only works for the Lush, Hush, Ambi, Edge, Domi and Osci toys.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the APreset command.
  The cooldown will be ignored for calls with pattern = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Rotate()

bool ULovenseFunctionLibrary::SendCommand_Rotate | ( | class ULovenseToy * | toy,
|  | uint8 | rotationSpeed
| ) |  |

static

Set rotation speed on a single or all available toys.

Note
  This command only works for the Nora toy.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the RotateAntiClockwise, RotateClockwise, RotateChange, ARotate and AVibRotate commands.
  The cooldown will be ignored for calls with rotationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_RotateAntiClockwise()

bool ULovenseFunctionLibrary::SendCommand_RotateAntiClockwise | ( | class ULovenseToy * | toy,
|  | uint8 | rotationSpeed
| ) |  |

static

Like SendCommand_Rotate(), but specifies the rotation direction to be anti-clockwise.

Note
  This command only works for the Nora toy.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Rotate, RotateClockwise, RotateChange, ARotate and AVibRotate commands.
  The cooldown will be ignored for calls with rotationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_RotateChange()

bool ULovenseFunctionLibrary::SendCommand_RotateChange | ( | class ULovenseToy * | toy | ) |

static

Toggles the rotation direction between clockwise and anti-clockwise on a single or all available toys.

Note
  This command only works for the Nora toy.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Rotate, RotateAntiClockwise, RotateClockwise, ARotate and AVibRotate commands.
  Only works with Lovense Connect.

Parameters

  toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_RotateClockwise()

bool ULovenseFunctionLibrary::SendCommand_RotateClockwise | ( | class ULovenseToy * | toy,
|  | uint8 | rotationSpeed
| ) |  |

static

Like SendCommand_Rotate(), but specifies the rotation direction to be clockwise.

Note
  This command only works for the Nora toy.
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the Rotate, RotateAntiClockwise, RotateChange, ARotate and AVibRotate commands.
  The cooldown will be ignored for calls with rotationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Stop()

bool ULovenseFunctionLibrary::SendCommand_Stop | ( | class ULovenseToy * | toy | ) |

static

Stop all commands a single or all available toys might be executing.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Suck()

bool ULovenseFunctionLibrary::SendCommand_Suck | ( | class ULovenseToy * | toy,
|  | uint8 | suctionSpeed
| ) |  |

static

Set suction speed on a single or all available toys.

Note
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the ASuck command.
  The cooldown will be ignored for calls with suctionSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Test()

bool ULovenseFunctionLibrary::SendCommand_Test | ( | class ULovenseToy * | toy | ) |

static

Makes a single or all available toys vibrate for 1.0 seconds to test connection.

Note
  This command has a cooldown of 1.0 seconds. If this command is sent again before the cooldown is over, that call will be ignored.

Parameters

  toy | Specifies the toy the command is sent to. Can be nullptr, in that case the command is sent to all available toys.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Thrust()

bool ULovenseFunctionLibrary::SendCommand_Thrust | ( | class ULovenseToy * | toy,
|  | uint8 | thrustingSpeed
| ) |  |

static

Set thrusting speed on a single or all available toys.

Note
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AThrust command.
  The cooldown will be ignored for calls with thrustingSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Vibrate()

bool ULovenseFunctionLibrary::SendCommand_Vibrate | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed
| ) |  |

static

Set vibration speed on a single or all available toys.

Note
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AVibrate, AVibRotate and AVibAir commands.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Vibrate1()

bool ULovenseFunctionLibrary::SendCommand_Vibrate1 | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed
| ) |  |

static

Set vibration speed of motor 1 on a single or all available toys.

Note
  This command only works for the Edge toy.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AVibrate1 command.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SendCommand_Vibrate2()

bool ULovenseFunctionLibrary::SendCommand_Vibrate2 | ( | class ULovenseToy * | toy,
|  | uint8 | vibrationSpeed
| ) |  |

static

Set vibration speed of motor 2 on a single or all available toys.

Note
  This command only works for the Edge toy.
  This command has a cooldown of 0.2 seconds. If this command is sent again before the cooldown is over, that call will be ignored.
  The cooldown for this command is shared with the AVibrate2 command.
  The cooldown will be ignored for calls with vibrationSpeed = 0.
  Only works with Lovense Connect.

Parameters

  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.

Returns
  Whether the command was successfully sent.

## ◆ SetToyAirEnabled()

void ULovenseFunctionLibrary::SetToyAirEnabled | ( | bool | value | ) |

static

Set cached "ToyAir" config value and write it to config.
If false, air speed values will be set to 0 before commands are sent, so toys will not pump. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any pumping toys stop pumping.

## ◆ SetToyFingeringEnabled()

void ULovenseFunctionLibrary::SetToyFingeringEnabled | ( | bool | value | ) |

static

Set cached "ToyFingering" config value and write it to config.
If false, fingering speed values will be set to 0 before commands are sent, so toys will not finger. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any fingering toys stop fingering.

## ◆ SetToyRotationEnabled()

void ULovenseFunctionLibrary::SetToyRotationEnabled | ( | bool | value | ) |

static

Set cached "ToyRotation" config value and write it to config.
If false, rotation speed values will be set to 0 before commands are sent, so toys will not rotate. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any rotating toys stop rotating.

## ◆ SetToySuctionEnabled()

void ULovenseFunctionLibrary::SetToySuctionEnabled | ( | bool | value | ) |

static

Set cached "ToySuction" config value and write it to config.
If false, suction speed values will be set to 0 before commands are sent, so toys will not suck. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any sucking toys stop sucking.

## ◆ SetToyThrustingEnabled()

void ULovenseFunctionLibrary::SetToyThrustingEnabled | ( | bool | value | ) |

static

Set cached "ToyThrusting" config value and write it to config.
If false, thrusting speed values will be set to 0 before commands are sent, so toys will not thrust. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any thrusting toys stop thrusting.

## ◆ SetToyVibrationEnabled()

void ULovenseFunctionLibrary::SetToyVibrationEnabled | ( | bool | value | ) |

static

Set cached "ToyVibration" config value and write it to config.
If false, vibration speed values will be set to 0 before commands are sent, so toys will not vibrate. Defaults to true;.

Note
  If value is false, will clear all commands to ensure that any vibrating toys stop vibrating.

## ◆ StartLovense()

void ULovenseFunctionLibrary::StartLovense | ( |  | ) |

static

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.

Note
  Does not check if the integration is already running, as calling this while the integration is already running is safe.

## ◆ StopLovense()

void ULovenseFunctionLibrary::StopLovense | ( |  | ) |

static

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.

Note
  Does not check if the integration is already stopped, as calling this while the integration is already stopped is safe.

The documentation for this class was generated from the following files:

- LovenseIntegration/Source/LovenseIntegration/Public/LovenseFunctionLibrary.h
- LovenseIntegration/Source/LovenseIntegration/Private/LovenseFunctionLibrary.cpp