Tilt Five NDK  1.4.1
tiltfive::Client Class Reference

Client for communicating with the Tilt Five™ API. More...

#include <TiltFiveNative.hpp>

Inheritance diagram for tiltfive::Client:
Collaboration diagram for tiltfive::Client:

Public Member Functions

auto listGlasses () -> Result< std::vector< std::string > >
 Enumerate glasses. More...
 
auto getServiceVersion () -> Result< std::string >
 Get the version of the Tilt Five™ service. More...
 
auto getChangedParams () -> Result< std::vector< T5_ParamSys > >
 Get a system-wide list of changed parameters. More...
 
auto isTiltFiveUiRequestingAttention () -> Result< bool >
 Check if the Tilt Five™ UI wants the users attention. More...
 
auto getGameboardSize (T5_GameboardType type) -> Result< T5_GameboardSize >
 Obtain the dimensions of the gameboard. More...
 
auto createParamChangedHelper (std::weak_ptr< ParamChangeListener > listener, std::chrono::milliseconds pollInterval=std::chrono::milliseconds(100)) -> std::unique_ptr< ParamChangeHelper >
 Create a ParamChangeHelper. More...
 

Detailed Description

Client for communicating with the Tilt Five™ API.

Definition at line 82 of file TiltFiveNative.hpp.

Member Function Documentation

◆ createParamChangedHelper()

auto tiltfive::Client::createParamChangedHelper ( std::weak_ptr< ParamChangeListener listener,
std::chrono::milliseconds  pollInterval = std::chrono::milliseconds(100) 
) -> std::unique_ptr<ParamChangeHelper>
inline

Create a ParamChangeHelper.

Using ParamChangeHelper

Parameters
[in]listener- A std::weak_ptr to a ParamChangeListener to receive callbacks
[in]pollInterval- Polling interval for changes
Returns
A std::unique_ptr to a ParamChangeHelper

Definition at line 297 of file TiltFiveNative.hpp.

◆ getChangedParams()

auto tiltfive::Client::getChangedParams ( ) -> Result<std::vector<T5_ParamSys>>
inline

Get a system-wide list of changed parameters.

This function doesn't return the values of the changed parameters, but vector of the parameters that have changed since this function was last called. Note that as a result, the first call to this function will always result in a count of 0.

Returns
A std::vector of T5_ParamSys containing the changed parameters

Definition at line 227 of file TiltFiveNative.hpp.

◆ getGameboardSize()

auto tiltfive::Client::getGameboardSize ( T5_GameboardType  type) -> Result<T5_GameboardSize>
inline

Obtain the dimensions of the gameboard.

Parameters
[in]type- T5_GameboardType of the gameboard to get dimensions for.
Returns
T5_GameboardType containing the requested dimensions.

Definition at line 279 of file TiltFiveNative.hpp.

◆ getServiceVersion()

auto tiltfive::Client::getServiceVersion ( ) -> Result<std::string>
inline

Get the version of the Tilt Five™ service.

Returns
String representing the version of the Tilt Five™ service. Format is Semantic Versioning.

Definition at line 208 of file TiltFiveNative.hpp.

◆ isTiltFiveUiRequestingAttention()

auto tiltfive::Client::isTiltFiveUiRequestingAttention ( ) -> Result<bool>
inline

Check if the Tilt Five™ UI wants the users attention.

From time to time, the Tilt Five™ UI may want the users attention, for example if there is an urgent wand firmware upgrade, or a connectivity problem that requires troubleshooting.

Applications may query this to determine if this is the case. This results in a better user experience - for example if a user is attempting to run your application with the Tilt Five™ hardware, and it's not working, it may be due to an issue that can be resolved in the control panel.

Returns
true if the Tilt Five™ UI wants the users attention, false otherwise.

Definition at line 261 of file TiltFiveNative.hpp.

◆ listGlasses()

auto tiltfive::Client::listGlasses ( ) -> Result<std::vector<std::string>>
inline

Enumerate glasses.

Glasses may not be ready to connect if they are in the process of booting (or rebooting).

Returns
Result containing either a vector of glasses identifier strings or an error.

Definition at line 164 of file TiltFiveNative.hpp.


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