TestListener Struct Reference
Inheritance diagram for TestListener:

## Public Member Functions

| TestListener ()
void | initializeInput (const std::string &device, const DataGroup &inputData) override
| Set the initial input data group. More...
void | handleInput (const std::string &device, const DataGroup &inputData) override
| Notifies the consumer that the application input coming from the device has been updated. More...
void | creatKeyMap ()
void | createModifierMap ()
void | initializeInput (const std::string &device, const DataGroup &inputData) override
| Set the initial input data group. More...
void | handleInput (const std::string &device, const DataGroup &inputData) override
| Notifies the consumer that the application input coming from the device has been updated. More...
Public Member Functions inherited from SurgSim::Input::InputConsumerInterface
virtual | ~InputConsumerInterface ()
| Virtual destructor (empty). More...

## Public Attributes

std::map< int, std::string > | keyMap
std::map< int, std::string > | modifierMap

## Constructor & Destructor Documentation

## TestListener()

TestListener::TestListener | ( |  | ) |

inline

## Member Function Documentation

## createModifierMap()

void TestListener::createModifierMap | ( |  | ) |

inline

## creatKeyMap()

void TestListener::creatKeyMap | ( |  | ) |

inline

## handleInput() [1/2]

void TestListener::handleInput | ( | const std::string & | device,
|  | const DataGroup & | inputData
| ) |  |

inline override virtual

Notifies the consumer that the application input coming from the device has been updated.

Typical input data contents (but note that individual devices may do things differently):

type | name |
--- | --- | ---
pose | "pose" | Device pose (units are meters).
bool | "button1" | State of the first device button.
bool | "button2" | State of the second device button (and so on).

Other possible contents includes:

type | name |
--- | --- | ---
bool | "isHomed" | Device homing status.
bool | "isHomedX" | Individual homing status for the X axis (and so on).
bool | "isHeld" | Safety sensor etc. status.
string | "model" | Device model description.
string | "serial" | Serial number string.
(any) | "debug:*" | Various debugging information

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## handleInput() [2/2]

void TestListener::handleInput | ( | const std::string & | device,
|  | const DataGroup & | inputData
| ) |  |

inline override virtual

Notifies the consumer that the application input coming from the device has been updated.

Typical input data contents (but note that individual devices may do things differently):

type | name |
--- | --- | ---
pose | "pose" | Device pose (units are meters).
bool | "button1" | State of the first device button.
bool | "button2" | State of the second device button (and so on).

Other possible contents includes:

type | name |
--- | --- | ---
bool | "isHomed" | Device homing status.
bool | "isHomedX" | Individual homing status for the X axis (and so on).
bool | "isHeld" | Safety sensor etc. status.
string | "model" | Device model description.
string | "serial" | Serial number string.
(any) | "debug:*" | Various debugging information

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## initializeInput() [1/2]

void TestListener::initializeInput | ( | const std::string & | device,
|  | const DataGroup & | inputData
| ) |  |

inline override virtual

Set the initial input data group.

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## initializeInput() [2/2]

void TestListener::initializeInput | ( | const std::string & | device,
|  | const DataGroup & | inputData
| ) |  |

inline override virtual

Set the initial input data group.

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## Member Data Documentation

## keyMap

std::map<int, std::string> TestListener::keyMap

## modifierMap

std::map<int, std::string> TestListener::modifierMap

The documentation for this struct was generated from the following files:

- SurgSim/Devices/Keyboard/VisualTests/KeyboardVisualTests.cpp
- SurgSim/Devices/Mouse/VisualTests/MouseVisualTests.cpp