WPILibC++ 2023.4.3
|
Simulation data value wrapper. More...
#include <hal/simulation/SimDataValue.h>
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 SimDataValue & | operator= (T value) |
Public Member Functions inherited from hal::impl::SimDataValueBase< T, MakeValue > | |
SimDataValueBase (T value) | |
LLVM_ATTRIBUTE_ALWAYS_INLINE void | CancelCallback (int32_t uid) |
T | Get () const |
LLVM_ATTRIBUTE_ALWAYS_INLINE | operator T () const |
void | Reset (T value) |
wpi::recursive_spinlock & | GetMutex () |
Additional Inherited Members | |
Protected Types inherited from hal::impl::SimCallbackRegistryBase | |
using | CallbackVector = wpi::UidVector< HalCallbackListener< RawFunctor >, 4 > |
using | RawFunctor = void(*)() |
Protected Member Functions inherited from 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 hal::impl::SimCallbackRegistryBase | |
int32_t | DoRegister (RawFunctor callback, void *param) |
LLVM_ATTRIBUTE_ALWAYS_INLINE void | DoReset () |
void | Cancel (int32_t uid) |
void | Reset () |
wpi::recursive_spinlock & | GetMutex () |
Protected Attributes inherited from hal::impl::SimDataValueBase< T, MakeValue > | |
T | m_value |
Protected Attributes inherited from hal::impl::SimCallbackRegistryBase | |
wpi::recursive_spinlock | m_mutex |
std::unique_ptr< CallbackVector > | m_callbacks |
Simulation data value wrapper.
Provides callback functionality when the data value is changed.
T | value type (e.g. double) |
MakeValue | function that takes a T and returns a HAL_Value |
GetName | function that returns a const char* for the name |
GetDefault | function that returns the default T (used only for default constructor) |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |