Capsule API Example

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
capsule::client::DeviceLocator Class Referencefinal

Device locator. More...

`#include <Device.hpp>`

## Public Member Functions
| DeviceLocator (const std::optional< fs::path > &logDirectory=std::nullopt)
| DeviceLocator (const DeviceLocator &)=delete
DeviceLocator & | operator= (const DeviceLocator &)=delete
| DeviceLocator (DeviceLocator &&rhd) noexcept
DeviceLocator & | operator= (DeviceLocator &&rhd) noexcept
| ~DeviceLocator ()
void | RequestDevices (device::DeviceType deviceType, core::SecondsI searchTime)
| Find available devices. Search time is in seconds. Non-blocking - OnDevices event is fired when timeout expires.
Device | CreateDevice (const std::string &deviceSerial) &
void | SetOnDevicesEvent (std::function< void(DeviceLocator &, const device::DeviceListExpected &)> &&callback)
void | Update ()
bool | IsValid () const noexcept
void | ResetDevice ()

## Static Public Member Functions
static void | SetSingleThreaded (bool singleThreaded)

## Detailed Description

Device locator.

Searches for available devices of chosen type

## Constructor & Destructor Documentation

## ◆ DeviceLocator() [1/3]

capsule::client::DeviceLocator::DeviceLocator | ( | const std::optional< fs::path > & | logDirectory = std::nullopt | ) |
| explicit

## ◆ DeviceLocator() [2/3]

capsule::client::DeviceLocator::DeviceLocator | ( | const DeviceLocator & |  | ) |
| delete

## ◆ DeviceLocator() [3/3]

capsule::client::DeviceLocator::DeviceLocator | ( | DeviceLocator && | rhd | ) |
| noexcept

## ◆ ~DeviceLocator()

capsule::client::DeviceLocator::~DeviceLocator | ( |  | ) |

## Member Function Documentation

## ◆ CreateDevice()

Device capsule::client::DeviceLocator::CreateDevice | ( | const std::string & | deviceSerial | ) | &

Create device for interaction.

Parameters

  deviceSerial | device ID string

Returns
  device

## ◆ IsValid()

bool capsule::client::DeviceLocator::IsValid | ( |  | ) | const
| noexcept

## ◆ operator=() [1/2]

DeviceLocator & capsule::client::DeviceLocator::operator= | ( | const DeviceLocator & |  | ) |
| delete

## ◆ operator=() [2/2]

DeviceLocator & capsule::client::DeviceLocator::operator= | ( | DeviceLocator && | rhd | ) |
| noexcept

## ◆ RequestDevices()

void capsule::client::DeviceLocator::RequestDevices | ( | device::DeviceType | deviceType,
|  | core::SecondsI | searchTime )

Find available devices. Search time is in seconds. Non-blocking - OnDevices event is fired when timeout expires.

Parameters

  deviceType |
  searchTime | search time in seconds

## ◆ ResetDevice()

void capsule::client::DeviceLocator::ResetDevice | ( |  | ) |

## ◆ SetOnDevicesEvent()

void capsule::client::DeviceLocator::SetOnDevicesEvent | ( | std::function< void(DeviceLocator &, const device::DeviceListExpected &)> && | callback | ) |

## ◆ SetSingleThreaded()

static void capsule::client::DeviceLocator::SetSingleThreaded | ( | bool | singleThreaded | ) |
| static

## ◆ Update()

void capsule::client::DeviceLocator::Update | ( |  | ) |

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

- C:/builds/bci/capsule/CapsuleClient/Include/Device.hpp