Braille Glove
 
Loading...
Searching...
No Matches
GloveModel Class Reference

Represents the glove model, simulating actuator behavior on a given hand. More...

#include <GloveModel.h>

Public Member Functions

 GloveModel (Hand hand, Actuator &actuator1, Actuator &actuator2, Actuator &actuator3)
 Constructs a GloveModel object with the given hand and actuators.
 
void resetAllActuators ()
 Resets all actuators to their initial state.
 
void executePatternAt (int index)
 Executes a pattern of actuations at the specified index in the pattern.
 
void pauseBetweenLetters ()
 Pauses between letters during a sequence of actuations.
 
void activateOnNumber (int number)
 Activates the stimuli on a given number representing a specific actuator pattern.
 
void setPattern (std::vector< int > newValues)
 Sets a new pattern of actuations to be played.
 
std::vector< int > getPattern ()
 Retrieves the current pattern of actuations.
 
int getPatternLength ()
 Returns the length of the current pattern.
 
void setChordMode (ChordingScheme chordMode)
 Sets the chording mode for the glove, either sequential or OST encoding.
 

Detailed Description

Represents the glove model, simulating actuator behavior on a given hand.

This class is used to simulate the actuations of actuators on a glove. It defines the pattern of actuations and the chording scheme (OST or sequential). The class also provides methods to control and reset actuators and manage the sequence of actuations.

Constructor & Destructor Documentation

◆ GloveModel()

GloveModel::GloveModel ( Hand hand,
Actuator & actuator1,
Actuator & actuator2,
Actuator & actuator3 )
inline

Constructs a GloveModel object with the given hand and actuators.

Initializes the glove with actuators and assigns the specified hand (left or right).

Parameters
handThe hand (left or right) of the glove.
actuator1First actuator of the glove.
actuator2Second actuator of the glove.
actuator3Third actuator of the glove.

Member Function Documentation

◆ activateOnNumber()

void GloveModel::activateOnNumber ( int number)
inline

Activates the stimuli on a given number representing a specific actuator pattern.

The method activates and deactivates actuators based on the given number and the selected encoding scheme (OST or sequential).

Parameters
numberThe number representing the actuator pattern to be activated using the specific stimuli.

◆ executePatternAt()

void GloveModel::executePatternAt ( int index)
inline

Executes a pattern of actuations at the specified index in the pattern.

Resets all actuators and vibrates based on the pattern at the given index.

Parameters
indexThe index of the pattern to be executed.

◆ getPattern()

std::vector< int > GloveModel::getPattern ( )
inline

Retrieves the current pattern of actuations.

This method returns the current pattern of actuations that is set.

Returns
A vector containing the current pattern of actuations.

◆ getPatternLength()

int GloveModel::getPatternLength ( )
inline

Returns the length of the current pattern.

Returns
The length of the current pattern.

◆ pauseBetweenLetters()

void GloveModel::pauseBetweenLetters ( )
inline

Pauses between letters during a sequence of actuations.

This function applies a custom delay and resets all actuators after the delay.

◆ resetAllActuators()

void GloveModel::resetAllActuators ( )
inline

Resets all actuators to their initial state.

This method deactivates all actuators, ensuring that they start in the same condition.

◆ setChordMode()

void GloveModel::setChordMode ( ChordingScheme chordMode)
inline

Sets the chording mode for the glove, either sequential or OST encoding.

This method selects the chording mode (either sequential or OST) for the actuations.

Parameters
chordModeThe desired chording scheme (SEQUENTIAL_ENCODING or OST_ENCODING).

◆ setPattern()

void GloveModel::setPattern ( std::vector< int > newValues)
inline

Sets a new pattern of actuations to be played.

This method allows the user to define a new pattern of actuations.

Parameters
newValuesA vector containing the new pattern of actuations.

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