PhantomDevice.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
17 #define SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
18 
19 #include <memory>
20 #include <string>
21 
23 
24 namespace SurgSim
25 {
26 namespace Device
27 {
28 class PhantomScaffold;
29 
30 
58 {
59 public:
65  PhantomDevice(const std::string& uniqueName, const std::string& initializationName);
66 
68  virtual ~PhantomDevice();
69 
74  std::string getInitializationName() const;
75 
76  virtual bool initialize() override;
77 
78  virtual bool finalize() override;
79 
81  bool isInitialized() const;
82 
83 private:
84  friend class PhantomScaffold;
85 
86  std::shared_ptr<PhantomScaffold> m_scaffold;
87  std::string m_initializationName;
88 };
89 
90 }; // namespace Device
91 }; // namespace SurgSim
92 
93 #endif // SURGSIM_DEVICES_PHANTOM_PHANTOMDEVICE_H
Definition: DriveElementFromInputBehavior.cpp:27
std::string getInitializationName() const
Gets the name used by the Phantom device configuration to refer to this device.
Definition: PhantomDevice.cpp:43
virtual bool finalize() override
Finalize (de-initialize) the device.
Definition: PhantomDevice.cpp:66
PhantomDevice(const std::string &uniqueName, const std::string &initializationName)
Constructor.
Definition: PhantomDevice.cpp:27
std::string m_initializationName
Definition: PhantomDevice.h:87
bool isInitialized() const
Check whether this device is initialized.
Definition: PhantomDevice.cpp:76
virtual bool initialize() override
Fully initialize the device.
Definition: PhantomDevice.cpp:49
virtual ~PhantomDevice()
Destructor.
Definition: PhantomDevice.cpp:34
A class implementing the communication with a SensAble/Geomagic PHANTOM device.
Definition: PhantomDevice.h:57
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:34
std::shared_ptr< PhantomScaffold > m_scaffold
Definition: PhantomDevice.h:86
A class that manages Sensable PHANTOM devices.
Definition: PhantomScaffold.h:38