16 #ifndef SURGSIM_DEVICES_NOVINT_NOVINTSCAFFOLD_H
17 #define SURGSIM_DEVICES_NOVINT_NOVINTSCAFFOLD_H
29 class NovintCommonDevice;
46 explicit NovintScaffold(std::shared_ptr<SurgSim::Framework::Logger> logger =
nullptr);
53 std::shared_ptr<SurgSim::Framework::Logger>
getLogger()
const;
199 return previousError || newError;
216 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
227 #endif // SURGSIM_DEVICES_NOVINT_NOVINTSCAFFOLD_H
A class that manages Novint Falcon devices.
Definition: NovintScaffold.h:40
NovintScaffold(std::shared_ptr< SurgSim::Framework::Logger > logger=nullptr)
Constructor.
Definition: NovintScaffold.cpp:377
Definition: DriveElementFromInputBehavior.cpp:27
static std::shared_ptr< NovintScaffold > getOrCreateSharedInstance()
Gets or creates the scaffold shared by all NovintDevice and Novint7DofDevice instances.
Definition: NovintScaffold.cpp:1178
bool checkForFatalError(const char *message)
Check for HDAL errors, display them, and signal fatal errors.
Definition: NovintScaffold.cpp:1118
bool unregisterDevice(const NovintCommonDevice *device)
Unregisters the specified device object.
Definition: NovintScaffold.cpp:486
LogLevel
Logging levels.
Definition: Logger.h:36
bool enforceGravityCompensation(const DeviceData *info, bool gravityCompensationState)
Attempts to force the gravity compensation flag for the current device to the specified value...
Definition: NovintScaffold.cpp:1026
A class implementing the communication with a Novint Falcon device.
Definition: NovintDevice.h:57
void checkDeviceHoming(DeviceData *info)
Checks whether a device has been homed.
Definition: NovintScaffold.cpp:668
static SurgSim::DataStructures::DataGroup buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
Definition: NovintScaffold.cpp:1139
static void setDefaultLogLevel(SurgSim::Framework::LogLevel logLevel)
Sets the default log level.
Definition: NovintScaffold.cpp:1184
bool setGravityCompensation(const DeviceData *info, bool gravityCompensationState)
Sets the gravity compensation flag for the current device, unless it's already set as desired...
Definition: NovintScaffold.cpp:1071
void setInputData(DeviceData *info)
Sets the input DataGroup, which will be pushed to the InputComponent.
Definition: NovintScaffold.cpp:881
bool initializeSdk()
Initializes the HDAL SDK.
Definition: NovintScaffold.cpp:895
void calculateForceAndTorque(DeviceData *info)
Calculates forces, and torques if the device is a 7Dof, and sends them to the HDAL.
Definition: NovintScaffold.cpp:717
bool destroyHapticLoop()
Destroys the haptic loop callback.
Definition: NovintScaffold.cpp:955
bool startScheduler()
Starts the HDAL scheduler.
Definition: NovintScaffold.cpp:970
void setPositionScale(const NovintCommonDevice *device, double scale)
Sets the position scale for this device.
Definition: NovintScaffold.cpp:1153
~NovintScaffold()
Destructor.
Definition: NovintScaffold.cpp:399
bool updateDevice(DeviceData *info)
Updates the device information for a single device.
Definition: NovintScaffold.cpp:592
bool runHapticFrame()
Executes the operations for a single haptic frame.
Definition: NovintScaffold.cpp:917
bool stopScheduler()
Stops the HDAL scheduler.
Definition: NovintScaffold.cpp:981
Definition: NovintScaffold.cpp:154
bool registerDevice(NovintCommonDevice *device)
Registers the specified device object.
Definition: NovintScaffold.cpp:425
A collection of NamedData objects.
Definition: DataGroup.h:66
std::shared_ptr< SurgSim::Framework::Logger > getLogger() const
Gets the logger used by this object and the devices it manages.
Definition: NovintScaffold.cpp:1189
bool finalizeDeviceState(DeviceData *info)
Finalizes a single device, destroying the necessary HDAL resources.
Definition: NovintScaffold.cpp:581
Definition: NovintScaffold.cpp:223
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Logger used by the scaffold and all devices.
Definition: NovintScaffold.h:216
bool getGravityCompensation(const DeviceData *info, bool *gravityCompensationState)
Gets the gravity compensation flag for the current device.
Definition: NovintScaffold.cpp:992
bool createHapticLoop()
Creates the haptic loop callback.
Definition: NovintScaffold.cpp:934
Definition: NovintScaffold.cpp:324
Definition: NovintScaffold.cpp:59
static SurgSim::Framework::LogLevel m_defaultLogLevel
The default logging level.
Definition: NovintScaffold.h:221
bool initializeDeviceState(DeviceData *info)
Initializes a single device, creating the necessary HDAL resources.
Definition: NovintScaffold.cpp:533
A class implementing the communication with a generic Novint Falcon device.
Definition: NovintCommonDevice.h:35
std::unique_ptr< StateData > m_state
Internal scaffold state.
Definition: NovintScaffold.h:218
bool checkForFatalError(bool previousError, const char *message)
Check for HDAL errors, display them, and signal fatal errors.
Definition: NovintScaffold.h:196
bool finalizeSdk()
Finalizes (de-initializes) the HDAL SDK.
Definition: NovintScaffold.cpp:906
void setOrientationScale(const NovintCommonDevice *device, double scale)
Sets the orientation scale for this device.
Definition: NovintScaffold.cpp:1165