iCub-main
Loading...
Searching...
No Matches
yarp::dev::eomc::defaults::DefaultsFactory Class Reference

Singleton factory class to create and manage default values with runtime configuration This class ensures a single instance is shared across all objects in the application All modifications to defaults are immediately visible to all objects accessing the singleton. More...

#include <embObjMotionControlDefaults.h>

Public Member Functions

void initializeDefaults ()
 Initialize all default values.
void setDefaultTimeouts (int defaultTimeout)
 Set all timeout values to the same value at runtime.
bool setTimeoutValue (const std::string &timeoutType, int value)
 Set individual timeout values at runtime.
const embObjMotionControlDefaults_t & getDefaults () const
 Get the current defaults structure.
embObjMotionControlDefaults_t & getDefaultsMutable ()
 Get mutable reference to defaults (advanced usage) Allows direct modification of nested fields.
void resetDefaults ()
 Reset all defaults to initial values Useful if you need to restore defaults after modifications.

Static Public Member Functions

static DefaultsFactory & getInstance ()
 Get the singleton instance (thread-safe in C++11+) Uses Meyer's singleton pattern for automatic thread-safety.

Detailed Description

Singleton factory class to create and manage default values with runtime configuration This class ensures a single instance is shared across all objects in the application All modifications to defaults are immediately visible to all objects accessing the singleton.

Definition at line 174 of file embObjMotionControlDefaults.h.

Member Function Documentation

◆ getDefaults()

const embObjMotionControlDefaults_t & yarp::dev::eomc::defaults::DefaultsFactory::getDefaults ( ) const
inline

Get the current defaults structure.

Returns
const reference to embObjMotionControlDefaults_t

Definition at line 305 of file embObjMotionControlDefaults.h.

◆ getDefaultsMutable()

embObjMotionControlDefaults_t & yarp::dev::eomc::defaults::DefaultsFactory::getDefaultsMutable ( )
inline

Get mutable reference to defaults (advanced usage) Allows direct modification of nested fields.

Returns
non-const reference to embObjMotionControlDefaults_t

Definition at line 315 of file embObjMotionControlDefaults.h.

◆ getInstance()

DefaultsFactory & yarp::dev::eomc::defaults::DefaultsFactory::getInstance ( )
inlinestatic

Get the singleton instance (thread-safe in C++11+) Uses Meyer's singleton pattern for automatic thread-safety.

Returns
reference to the unique DefaultsFactory instance

Definition at line 198 of file embObjMotionControlDefaults.h.

◆ initializeDefaults()

void yarp::dev::eomc::defaults::DefaultsFactory::initializeDefaults ( )
inline

Initialize all default values.

Definition at line 207 of file embObjMotionControlDefaults.h.

◆ resetDefaults()

void yarp::dev::eomc::defaults::DefaultsFactory::resetDefaults ( )
inline

Reset all defaults to initial values Useful if you need to restore defaults after modifications.

Definition at line 324 of file embObjMotionControlDefaults.h.

◆ setDefaultTimeouts()

void yarp::dev::eomc::defaults::DefaultsFactory::setDefaultTimeouts ( int defaultTimeout)
inline

Set all timeout values to the same value at runtime.

Parameters
defaultTimeoutthe timeout value in milliseconds

Definition at line 269 of file embObjMotionControlDefaults.h.

◆ setTimeoutValue()

bool yarp::dev::eomc::defaults::DefaultsFactory::setTimeoutValue ( const std::string & timeoutType,
int value )
inline

Set individual timeout values at runtime.

Parameters
timeoutTypewhich timeout to set ("velocity_ref", "current_ref", "pwm_ref", "torque_ref", "torque_fbk")
valuethe timeout value in milliseconds
Returns
true on success, false if invalid timeout type

Definition at line 284 of file embObjMotionControlDefaults.h.


The documentation for this class was generated from the following file: