All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
SurgSim::Device::IdentityPoseDevice Class Reference

A class implementing the identity pose device, which is a pretend device that doesn't move. More...

#include <SurgSim/Devices/IdentityPoseDevice/IdentityPoseDevice.h>

Inheritance diagram for SurgSim::Device::IdentityPoseDevice:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Device::IdentityPoseDevice:
Collaboration graph
[legend]

Public Member Functions

 IdentityPoseDevice (const std::string &uniqueName)
 Constructor. More...
 
virtual bool addInputConsumer (std::shared_ptr< SurgSim::Input::InputConsumerInterface > inputConsumer)
 Connect this device to an InputConsumerInterface, which will receive the data that comes from this device. More...
 
- Public Member Functions inherited from SurgSim::Input::CommonDevice
 CommonDevice (const std::string &name)
 Constructor. More...
 
 CommonDevice (const std::string &name, const SurgSim::DataStructures::DataGroup &inputData)
 Constructor. More...
 
 CommonDevice (const std::string &name, SurgSim::DataStructures::DataGroup &&inputData)
 Constructor. More...
 
virtual ~CommonDevice ()
 Destructor. More...
 
virtual std::string getName () const override
 Return a (hopefully unique) device name. More...
 
void setNameForCallback (const std::string &name)
 Set the name used for calling the input consumers and output producer. More...
 
std::string getNameForCallback () const
 Get the name used for calling the input consumers and output producer. More...
 
virtual bool removeInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer) override
 Disconnect this device from an InputConsumerInterface, which will no longer receive data from this device. More...
 
virtual bool setOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override
 Connect this device to an OutputProducerInterface, which will send data to this device. More...
 
virtual bool removeOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override
 Disconnect this device from an OutputProducerInterface, which will no longer send data to this device. More...
 
virtual bool hasOutputProducer () override
 Getter for whether or not this device is connected with an OutputProducerInterface. More...
 
- Public Member Functions inherited from SurgSim::Input::DeviceInterface
virtual ~DeviceInterface ()
 Virtual destructor (empty). More...
 

Protected Member Functions

virtual bool initialize ()
 Fully initialize the device. More...
 
virtual bool finalize ()
 Finalize (de-initialize) the device. More...
 
- Protected Member Functions inherited from SurgSim::Input::CommonDevice
virtual void pushInput ()
 Push application input to consumers. More...
 
virtual bool pullOutput ()
 Pull application output from a producer. More...
 
SurgSim::DataStructures::DataGroupgetInputData ()
 Getter for the input data DataGroup. More...
 
const
SurgSim::DataStructures::DataGroup
getOutputData () const
 Getter for the output data DataGroup. More...
 

Static Protected Member Functions

static
SurgSim::DataStructures::DataGroup 
buildInputData ()
 Builds the data layout for the application input (i.e. device output). More...
 

Detailed Description

A class implementing the identity pose device, which is a pretend device that doesn't move.

The identity pose device produces a pose that's always the identity transform (no translation from the origin and no rotation from the model orientation). This can be useful not only for writing tests, but also as a way to replace real hardware devices in situations where the simulator needs to be run but the hardware is not currently available.

See also
SurgSim::Input::DeviceInterface

Constructor & Destructor Documentation

SurgSim::Device::IdentityPoseDevice::IdentityPoseDevice ( const std::string &  uniqueName)
explicit

Constructor.

Parameters
uniqueNameA unique name for the device that will be used by the application.

Member Function Documentation

bool SurgSim::Device::IdentityPoseDevice::addInputConsumer ( std::shared_ptr< SurgSim::Input::InputConsumerInterface inputConsumer)
virtual

Connect this device to an InputConsumerInterface, which will receive the data that comes from this device.

Parameters
inputConsumerThe InputConsumerInterface to connect with.
Returns
true if successful

Reimplemented from SurgSim::Input::CommonDevice.

DataGroup SurgSim::Device::IdentityPoseDevice::buildInputData ( )
staticprotected

Builds the data layout for the application input (i.e. device output).

bool SurgSim::Device::IdentityPoseDevice::finalize ( )
protectedvirtual

Finalize (de-initialize) the device.

Implements SurgSim::Input::DeviceInterface.

bool SurgSim::Device::IdentityPoseDevice::initialize ( )
protectedvirtual

Fully initialize the device.

When the manager object creates the device, the internal state of the device usually isn't fully initialized yet. This method performs any needed initialization.

Implements SurgSim::Input::DeviceInterface.


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