WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
hal::SimDataValue< T, MakeValue, GetName, GetDefault > Class Template Referencefinal

Simulation data value wrapper. More...

#include <SimDataValue.h>

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

Public Member Functions

 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)
 
Get () const
 
LLVM_ATTRIBUTE_ALWAYS_INLINE operator T () const
 
void Reset (T value)
 
wpi::recursive_spinlockGetMutex ()
 

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_spinlockGetMutex ()
 
- Protected Attributes inherited from hal::impl::SimDataValueBase< T, MakeValue >
m_value
 
- Protected Attributes inherited from hal::impl::SimCallbackRegistryBase
wpi::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 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)

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