![]() |
A class implementing the identity pose device, which is a pretend device that doesn't move. More...
#include <SurgSim/Devices/IdentityPoseDevice/IdentityPoseDevice.h>
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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
virtual void | pushInput () |
Push application input to consumers. More... | |
virtual bool | pullOutput () |
Pull application output from a producer. More... | |
SurgSim::DataStructures::DataGroup & | getInputData () |
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... | |
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.
|
explicit |
Constructor.
uniqueName | A unique name for the device that will be used by the application. |
|
virtual |
Connect this device to an InputConsumerInterface, which will receive the data that comes from this device.
inputConsumer | The InputConsumerInterface to connect with. |
Reimplemented from SurgSim::Input::CommonDevice.
|
staticprotected |
Builds the data layout for the application input (i.e. device output).
|
protectedvirtual |
Finalize (de-initialize) the device.
Implements SurgSim::Input::DeviceInterface.
|
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.