Class inertialsim::time::TimeTolerances¶
ClassList > inertialsim > time > TimeTolerances
Singleton class for managing time tolerance settings. More...
#include <tolerances.h>
Public Functions¶
| Type | Name |
|---|---|
| TimeTolerances (const TimeTolerances &) = delete |
|
| TimeTolerances (TimeTolerances &&) = delete |
|
| TimeTolerances & | operator= (const TimeTolerances &) = delete |
| TimeTolerances & | operator= (TimeTolerances &&) = delete |
| void | reset () Reset all tolerances to default values. |
| SampleRateTolerances | sample_rate_tolerances () const Get the current sample rate tolerances. |
| void | set_sample_rate_tolerances (const SampleRateTolerances & tolerances) Set the sample rate tolerances. |
| void | set_tolerance (double value) Set the timestamp tolerance. |
| double | tolerance () const Get the current timestamp tolerance. |
| ~TimeTolerances () = default |
Public Static Functions¶
| Type | Name |
|---|---|
| TimeTolerances & | Instance () Get the singleton instance. |
Detailed Description¶
This class provides thread-safe access to global tolerance settings used throughout the time module for timestamp comparisons and sample rate validation.
Example usage:
// Set timestamp tolerance
TimeTolerances::Instance().set_tolerance(1e-9);
// Get timestamp tolerance
double tol = TimeTolerances::Instance().tolerance();
// Set sample rate tolerances
SampleRateTolerances sr_tol{0.6, 1.4, 0.01, 0.1};
TimeTolerances::Instance().set_sample_rate_tolerances(sr_tol);
// Reset to defaults
TimeTolerances::Instance().set_default();
Public Functions Documentation¶
function TimeTolerances [⅓]¶
function TimeTolerances [⅔]¶
function operator=¶
function operator=¶
function reset¶
Reset all tolerances to default values.
function sample_rate_tolerances¶
Get the current sample rate tolerances.
Returns:
The current sample rate tolerances.
function set_sample_rate_tolerances¶
Set the sample rate tolerances.
inline void inertialsim::time::TimeTolerances::set_sample_rate_tolerances (
const SampleRateTolerances & tolerances
)
Parameters:
tolerancesThe new sample rate tolerances.
function set_tolerance¶
Set the timestamp tolerance.
Parameters:
valueThe new timestamp tolerance value.
function tolerance¶
Get the current timestamp tolerance.
Returns:
The current timestamp tolerance value.
function ~TimeTolerances¶
Public Static Functions Documentation¶
function Instance¶
Get the singleton instance.
Returns:
Reference to the singleton instance (thread-safe).
The documentation for this class was generated from the following file cpp/include/inertialsim/time/tolerances.h