Maestro C API  v0.1 Alpha
Glove management functions

These functions are used to manage and reference the Maestro gloves. More...

Functions

bool start_maestro_detection_service ()
 
intptr_t const get_left_glove_pointer ()
 
intptr_t const get_right_glove_pointer ()
 
bool is_glove_connected (intptr_t maestroPtr)
 
const MaestroGloveContext *const get_glove_context (intptr_t maestroPtr)
 

Detailed Description

These functions are used to manage and reference the Maestro gloves.

#include "maestro.h"

start_maestro_detection_service() must be called before calibration, haptics, or any motion capture data can be used. The returned pointers should be stored and passed into all other Maestro API functions.

Function Documentation

◆ get_glove_context()

const MaestroGloveContext* const get_glove_context ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
The current Maestro data. This returns a struct containing the same values acquired by calling get_displacement_context(), get_vibration_context(), get_force_feedback_context(), and is_glove_connected().

◆ get_left_glove_pointer()

intptr_t const get_left_glove_pointer ( )
Returns
The pointer to the left glove context. This value should be passed into other function that set or retrieve values for the left glove.

◆ get_right_glove_pointer()

intptr_t const get_right_glove_pointer ( )
Returns
The pointer to the right glove context. This value should be passed into other functions that set or retrieve values for the right glove.

◆ is_glove_connected()

bool is_glove_connected ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Whether or not the glove referenced by maestroPtr is connected.

◆ start_maestro_detection_service()

bool start_maestro_detection_service ( )

Start the Maestro glove detection thread. This function must be called in order for the Maestro glove(s) to connect. This will spawn a new thread that manages the connecting and disconnecting of Maestro gloves.

Returns
Whether or not the detection thread started successfully.