PhantomDevice.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
#define SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
#include <memory>
#include <string>
#include "SurgSim/Input/CommonDevice.h"
namespace SurgSim
{
namespace Devices
{
class PhantomScaffold;
SURGSIM_STATIC_REGISTRATION(PhantomDevice);
class PhantomDevice : public SurgSim::Input::CommonDevice
{
public:
explicit PhantomDevice(const std::string& uniqueName);
SURGSIM_CLASSNAME(SurgSim::Devices::PhantomDevice);
virtual ~PhantomDevice();
void setInitializationName(const std::string& initializationName);
std::string getInitializationName() const;
bool initialize() override;
bool isInitialized() const override;
private:
friend class PhantomScaffold;
bool finalize() override;
std::shared_ptr<PhantomScaffold> m_scaffold;
std::string m_initializationName;
};
}; // namespace Devices
}; // namespace SurgSim
#endif // SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
SurgSim::Devices::PhantomDevice::isInitialized
bool isInitialized() const override
Definition: PhantomDevice.cpp:80
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Devices::PhantomDevice::finalize
bool finalize() override
Finalize (de-initialize) the device.
Definition: PhantomDevice.cpp:71
SurgSim::Devices::PhantomDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: PhantomDevice.cpp:55
SurgSim::Devices::PhantomDevice::~PhantomDevice
virtual ~PhantomDevice()
Destructor.
Definition: PhantomDevice.cpp:36
SurgSim::Devices::PhantomDevice::setInitializationName
void setInitializationName(const std::string &initializationName)
Sets the name used to register this device with the hardware library.
Definition: PhantomDevice.cpp:44
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
SurgSim::Devices::PhantomDevice::m_scaffold
std::shared_ptr< PhantomScaffold > m_scaffold
Definition: PhantomDevice.h:91
SurgSim::Devices::PhantomDevice::m_initializationName
std::string m_initializationName
Definition: PhantomDevice.h:92
SurgSim::Devices::PhantomDevice::PhantomDevice
PhantomDevice(const std::string &uniqueName)
Constructor.
Definition: PhantomDevice.cpp:28
CommonDevice.h
SurgSim::Devices::PhantomDevice::getInitializationName
std::string getInitializationName() const
Gets the name used by the Phantom device configuration to refer to this device.
Definition: PhantomDevice.cpp:49
SurgSim::Devices::PhantomDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::PhantomDevice)
SurgSim::Devices::PhantomScaffold
A class that manages Sensable PHANTOM devices.
Definition: PhantomScaffold.h:38
SurgSim::Devices::PhantomDevice
A class implementing the communication with a SensAble/Geomagic PHANTOM device.
Definition: PhantomDevice.h:58