All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
SurgSim::Input::InputConsumerInterface Class Referenceabstract

Interface for a consumer that monitors device and signal state updates (pose, buttons, etc). More...

#include <SurgSim/Input/InputConsumerInterface.h>

Inheritance diagram for SurgSim::Input::InputConsumerInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~InputConsumerInterface ()
 Virtual destructor (empty). More...
 
virtual void handleInput (const std::string &device, const SurgSim::DataStructures::DataGroup &inputData)=0
 Notifies the consumer that the application input coming from the device has been updated. More...
 
virtual void initializeInput (const std::string &device, const SurgSim::DataStructures::DataGroup &inputData)=0
 Set the initial input data group. More...
 

Detailed Description

Interface for a consumer that monitors device and signal state updates (pose, buttons, etc).

Constructor & Destructor Documentation

virtual SurgSim::Input::InputConsumerInterface::~InputConsumerInterface ( )
inlinevirtual

Virtual destructor (empty).

Member Function Documentation

virtual void SurgSim::Input::InputConsumerInterface::handleInput ( const std::string &  device,
const SurgSim::DataStructures::DataGroup inputData 
)
pure 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
deviceThe 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).
inputDataThe application input state coming from the device.

Implemented in LabJackToPoseFilter, SurgSim::Device::PoseTransform, SurgSim::Device::PoseIntegrator, SurgSim::Device::ForceScale, SurgSim::Input::InputConsumer, TestListener, TestListener, MovingSquareGlutWindow, MovingSquareForce, and SurgSim::Testing::MockInputOutput.

virtual void SurgSim::Input::InputConsumerInterface::initializeInput ( const std::string &  device,
const SurgSim::DataStructures::DataGroup inputData 
)
pure virtual

Set the initial input data group.

Parameters
deviceThe 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).
inputDataThe application input state coming from the device.

Implemented in LabJackToPoseFilter, SurgSim::Device::PoseTransform, SurgSim::Device::PoseIntegrator, SurgSim::Device::ForceScale, SurgSim::Input::InputConsumer, TestListener, MovingSquareGlutWindow, TestListener, MovingSquareForce, and SurgSim::Testing::MockInputOutput.


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