Tilt Five NDK
tiltfive::WandStreamHelper Class Reference

Utility class to manage the wand stream. More...

#include <TiltFiveNative.hpp>

Inheritance diagram for tiltfive::WandStreamHelper:
Collaboration diagram for tiltfive::WandStreamHelper:

Public Member Functions

auto consumeLastAsyncError () -> std::error_code
 Obtain and consume the last asynchronous error. More...
 
auto listWands () -> Result< std::vector< std::shared_ptr< Wand > > >
 Obtain a list of tiltfive::Wand. More...
 

Detailed Description

Utility class to manage the wand stream.

De-multiplexes the wand stream into abstract tiltfive::Wand objects that can be independently queried for their last known state.

See Using WandStreamHelper for usage.

Definition at line 923 of file TiltFiveNative.hpp.

Member Function Documentation

◆ consumeLastAsyncError()

auto tiltfive::WandStreamHelper::consumeLastAsyncError ( ) -> std::error_code
inline

Obtain and consume the last asynchronous error.

The connection process may produce errors asynchronously which can be detected by calling this.

Returns
The last known error or a default std::error_code if no error was present

Definition at line 1078 of file TiltFiveNative.hpp.

◆ listWands()

auto tiltfive::WandStreamHelper::listWands ( ) -> Result<std::vector<std::shared_ptr<Wand>>>
inline

Obtain a list of tiltfive::Wand.

The tiltfive::WandStreamHelper maintains a stream reader thread while there are any outstanding references to the returned tiltfive::Wand objects, automatically terminating the stream when they go out of scope.

Definition at line 1089 of file TiltFiveNative.hpp.


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