16 #ifndef SURGSIM_DEVICES_SIXENSE_SIXENSESCAFFOLD_H 17 #define SURGSIM_DEVICES_SIXENSE_SIXENSESCAFFOLD_H 43 std::shared_ptr<SurgSim::Framework::Logger>
getLogger()
const 71 explicit SixenseScaffold(std::shared_ptr<SurgSim::Framework::Logger> logger =
nullptr);
139 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
154 #endif // SURGSIM_DEVICES_SIXENSE_SIXENSESCAFFOLD_H bool destroyThread()
Destroys the input loop thread.
Definition: SixenseScaffold.cpp:445
std::unique_ptr< StateData > m_state
Internal scaffold state.
Definition: SixenseScaffold.h:141
Definition: DriveElementFromInputBehavior.cpp:27
LogLevel
Logging levels.
Definition: Logger.h:36
bool findUnusedDeviceAndRegister(SixenseDevice *device, int *numUsedDevicesSeen, bool *fatalError)
Scans controllers that are present in the system, and if an unused one is found, register a device fo...
Definition: SixenseScaffold.cpp:331
bool updateDevice(const DeviceData &info)
Updates the device information for a single device.
Definition: SixenseScaffold.cpp:250
bool createThread()
Creates the input loop thread.
Definition: SixenseScaffold.cpp:434
static int m_startupDelayMilliseconds
How long we're willing to wait for devices to be detected, in milliseconds.
Definition: SixenseScaffold.h:146
bool finalizeSdk()
Finalizes (de-initializes) the Sixense SDK.
Definition: SixenseScaffold.cpp:315
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Logger used by the scaffold and all devices.
Definition: SixenseScaffold.h:139
~SixenseScaffold()
Destructor.
Definition: SixenseScaffold.cpp:115
SixenseScaffold(std::shared_ptr< SurgSim::Framework::Logger > logger=nullptr)
Constructor.
Definition: SixenseScaffold.cpp:103
bool initializeSdk()
Initializes the Sixense SDK.
Definition: SixenseScaffold.cpp:299
bool registerDevice(SixenseDevice *device)
Registers the specified device object.
Definition: SixenseScaffold.cpp:143
static SurgSim::Framework::LogLevel m_defaultLogLevel
The default logging level.
Definition: SixenseScaffold.h:144
static SurgSim::DataStructures::DataGroup buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
Definition: SixenseScaffold.cpp:456
A class implementing the thread context for sampling Sixense devices.
Definition: SixenseThread.h:33
A collection of NamedData objects.
Definition: DataGroup.h:66
static std::shared_ptr< SixenseScaffold > getOrCreateSharedInstance()
Gets or creates the scaffold shared by all SixenseDevice instances.
Definition: SixenseScaffold.cpp:474
bool runInputFrame()
Executes the operations for a single input frame.
Definition: SixenseScaffold.cpp:234
A class implementing the communication with one Sixense controller, for example one of the two on the...
Definition: SixenseDevice.h:52
static void setDefaultLogLevel(SurgSim::Framework::LogLevel logLevel)
Sets the default log level.
Definition: SixenseScaffold.cpp:483
bool unregisterDevice(const SixenseDevice *device)
Unregisters the specified device object.
Definition: SixenseScaffold.cpp:212
A class that manages Sixense devices, such as the Razer Hydra.
Definition: SixenseScaffold.h:35
Definition: SixenseScaffold.cpp:52
Definition: SixenseScaffold.cpp:76
std::shared_ptr< SurgSim::Framework::Logger > getLogger() const
Gets the logger used by this object and the devices it manages.
Definition: SixenseScaffold.h:43
static int m_startupRetryIntervalMilliseconds
How long to wait between trying to detect devices, in milliseconds.
Definition: SixenseScaffold.h:148
bool registerIfUnused(int baseIndex, int controllerIndex, SixenseDevice *device, int *numUsedDevicesSeen)
Register a device object given a (baseIndex, controllerIndex) pair, if the same pair is not already i...
Definition: SixenseScaffold.cpp:404