M1M3 Support System
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
LSST::M1M3::SS::Range Class Reference

Utility range checking functions. More...

#include <Range.h>

Static Public Member Functions

template<typename T >
static bool InRange (T min, T max, T value)
 Template function to check if a value is inside a given range.
 
template<typename T >
static T CoerceIntoRange (T min, T max, T value)
 
template<typename T >
static bool InRangeAndCoerce (T min, T max, T value, T *output)
 
template<typename T , typename... TArgs>
static bool InRangeTrigger (T min, T max, T value, LimitTrigger< TArgs... > &limitTrigger, TArgs... lArgs)
 Tests if value is in given range.
 

Detailed Description

Utility range checking functions.

Member Function Documentation

◆ InRange()

template<typename T >
static bool LSST::M1M3::SS::Range::InRange ( T min,
T max,
T value )
inlinestatic

Template function to check if a value is inside a given range.

Template Parameters
Tvalue type. All parameters shall have the same type.
Parameters
minrange minimal value
maxrange maximal value
valuevalue to test
Returns
true if value >= min and value <= max
Here is the caller graph for this function:

◆ InRangeTrigger()

template<typename T , typename... TArgs>
static bool LSST::M1M3::SS::Range::InRangeTrigger ( T min,
T max,
T value,
LimitTrigger< TArgs... > & limitTrigger,
TArgs... lArgs )
inlinestatic

Tests if value is in given range.

Fires LimitTrigger if conditions aren't met. Reset LimitTrigger if conditions returned back to normal.

Template Parameters
Ttest value type
TArgsvariadic arguments for LimitTrigger
Parameters
minrange minimal value
maxrange maximal value
valuetest value
limitTriggerLimitTrigger subclass to report problems with range
lArgsLimitTrigger arguments
Returns
true if value >= min and value <= max
Here is the call graph for this function:
Here is the caller graph for this function:

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