WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault > Class Template Referencefinal

Simulation data value wrapper. More...

#include <wpi/hal/simulation/SimDataValue.hpp>

Inheritance diagram for wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >:
wpi::hal::impl::SimDataValueBase< T, MakeValue > wpi::hal::impl::SimCallbackRegistryBase

Public Member Functions

 SimDataValue ()
 SimDataValue (T value)
LLVM_ATTRIBUTE_ALWAYS_INLINE int32_t RegisterCallback (HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
LLVM_ATTRIBUTE_ALWAYS_INLINE void Set (T value)
LLVM_ATTRIBUTE_ALWAYS_INLINE SimDataValueoperator= (T value)
Public Member Functions inherited from wpi::hal::impl::SimDataValueBase< T, MakeValue >
 SimDataValueBase (T value)
LLVM_ATTRIBUTE_ALWAYS_INLINE void CancelCallback (int32_t uid)
Get () const
LLVM_ATTRIBUTE_ALWAYS_INLINE operator T () const
void Reset (T value)
wpi::util::recursive_spinlockGetMutex ()

Additional Inherited Members

Protected Types inherited from wpi::hal::impl::SimCallbackRegistryBase
using CallbackVector
using RawFunctor = void (*)()
Protected Member Functions inherited from wpi::hal::impl::SimDataValueBase< T, MakeValue >
int32_t DoRegisterCallback (HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify, const char *name)
void DoSet (T value, const char *name)
Protected Member Functions inherited from wpi::hal::impl::SimCallbackRegistryBase
int32_t DoRegister (RawFunctor callback, void *param)
LLVM_ATTRIBUTE_ALWAYS_INLINE void DoReset ()
void Cancel (int32_t uid)
void Reset ()
wpi::util::recursive_spinlockGetMutex ()
Protected Attributes inherited from wpi::hal::impl::SimDataValueBase< T, MakeValue >
m_value
Protected Attributes inherited from wpi::hal::impl::SimCallbackRegistryBase
wpi::util::recursive_spinlock m_mutex
std::unique_ptr< CallbackVectorm_callbacks

Detailed Description

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
class wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >

Simulation data value wrapper.

Provides callback functionality when the data value is changed.

Template Parameters
Tvalue type (e.g. double)
MakeValuefunction that takes a T and returns a HAL_Value
GetNamefunction that returns a const char* for the name
GetDefaultfunction that returns the default T (used only for default constructor)

Constructor & Destructor Documentation

◆ SimDataValue() [1/2]

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >::SimDataValue ( )
inline

◆ SimDataValue() [2/2]

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >::SimDataValue ( T value)
inlineexplicit

Member Function Documentation

◆ operator=()

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
LLVM_ATTRIBUTE_ALWAYS_INLINE SimDataValue & wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >::operator= ( T value)
inline

◆ RegisterCallback()

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
LLVM_ATTRIBUTE_ALWAYS_INLINE int32_t wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >::RegisterCallback ( HAL_NotifyCallback callback,
void * param,
HAL_Bool initialNotify )
inline

◆ Set()

template<typename T, HAL_Value(*)(T) MakeValue, const char *(*)() GetName, T(*)() GetDefault = nullptr>
LLVM_ATTRIBUTE_ALWAYS_INLINE void wpi::hal::SimDataValue< T, MakeValue, GetName, GetDefault >::Set ( T value)
inline

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