16 #ifndef SURGSIM_DEVICES_TRACKIR_TRACKIRSCAFFOLD_H
17 #define SURGSIM_DEVICES_TRACKIR_TRACKIRSCAFFOLD_H
26 namespace DataStructures
44 explicit TrackIRScaffold(std::shared_ptr<SurgSim::Framework::Logger> logger =
nullptr);
51 std::shared_ptr<SurgSim::Framework::Logger>
getLogger()
const;
135 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
147 #endif // SURGSIM_DEVICES_TRACKIR_TRACKIRSCAFFOLD_H
void setOrientationScale(const TrackIRDevice *device, double scale)
Sets the orientation scale for the device.
Definition: TrackIRScaffold.cpp:242
Definition: DriveElementFromInputBehavior.cpp:27
LogLevel
Logging levels.
Definition: Logger.h:36
A class implementing the communication with Natural Point TrackIR camera.
Definition: TrackIRDevice.h:40
TrackIRScaffold(std::shared_ptr< SurgSim::Framework::Logger > logger=nullptr)
Constructor.
Definition: TrackIRScaffold.cpp:104
Definition: TrackIRScaffold.cpp:49
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Logger used by the scaffold and all devices.
Definition: TrackIRScaffold.h:135
bool startCamera(DeviceData *info)
Start the camera, it will start sending frames.
Definition: TrackIRScaffold.cpp:368
bool finalizeSdk()
Finalizes (de-initializes) the OptiTrack SDK.
Definition: TrackIRScaffold.cpp:332
bool unregisterDevice(const TrackIRDevice *device)
Unregisters the specified device object.
Definition: TrackIRScaffold.cpp:201
bool createPerDeviceThread(DeviceData *data)
Creates a thread for the given DeviceData object.
Definition: TrackIRScaffold.cpp:346
~TrackIRScaffold()
Destructor.
Definition: TrackIRScaffold.cpp:117
bool initializeSdk()
Initializes the OptiTrack SDK.
Definition: TrackIRScaffold.cpp:304
A class implementing the thread context for sampling TrackIR devices.
Definition: TrackIRThread.h:29
static SurgSim::DataStructures::DataGroup buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
Definition: TrackIRScaffold.cpp:378
std::unique_ptr< StateData > m_state
Internal scaffold state.
Definition: TrackIRScaffold.h:141
A collection of NamedData objects.
Definition: DataGroup.h:66
bool registerDevice(TrackIRDevice *device)
Registers the specified device object.
Definition: TrackIRScaffold.cpp:154
void setPositionScale(const TrackIRDevice *device, double scale)
Sets the position scale for the device.
Definition: TrackIRScaffold.cpp:229
bool destroyPerDeviceThread(DeviceData *data)
Destroys the thread associated with the given DeviceData object.
Definition: TrackIRScaffold.cpp:357
bool stopCamera(DeviceData *info)
Stop the camera, it will stop sending frames.
Definition: TrackIRScaffold.cpp:373
bool updateDevice(DeviceData *info)
Updates the device information for a single device.
Definition: TrackIRScaffold.cpp:265
Definition: TrackIRScaffold.cpp:80
bool runInputFrame(DeviceData *info)
Executes the operations for a single input frame for a single device.
Definition: TrackIRScaffold.cpp:255
static SurgSim::Framework::LogLevel m_defaultLogLevel
The default logging level.
Definition: TrackIRScaffold.h:138
static void setDefaultLogLevel(SurgSim::Framework::LogLevel logLevel)
Sets the default log level.
Definition: TrackIRScaffold.cpp:391
A class that manages Natural Point TRACKIR devices.
Definition: TrackIRScaffold.h:38
std::shared_ptr< SurgSim::Framework::Logger > getLogger() const
Gets the logger used by this object and the devices it manages.
Definition: TrackIRScaffold.cpp:148
static std::shared_ptr< TrackIRScaffold > getOrCreateSharedInstance()
Gets or creates the scaffold shared by all TrackIRDevice instances.
Definition: TrackIRScaffold.cpp:385