WPILibC++ 2023.4.3
hal::SimCallbackRegistry< CallbackFunction, GetName > Class Template Reference

Simulation callback registry. More...

#include <hal/simulation/SimCallbackRegistry.h>

Inheritance diagram for hal::SimCallbackRegistry< CallbackFunction, GetName >:
hal::impl::SimCallbackRegistryBase

Public Member Functions

int32_t Register (CallbackFunction callback, void *param)
 
template<typename... U>
void Invoke (U &&... u) const
 
template<typename... U>
LLVM_ATTRIBUTE_ALWAYS_INLINE void operator() (U &&... u) const
 
- Public Member Functions inherited from hal::impl::SimCallbackRegistryBase
void Cancel (int32_t uid)
 
void Reset ()
 
wpi::recursive_spinlockGetMutex ()
 

Additional Inherited Members

- Public Types inherited from hal::impl::SimCallbackRegistryBase
using RawFunctor = void(*)()
 
- Protected Types inherited from hal::impl::SimCallbackRegistryBase
using CallbackVector = wpi::UidVector< HalCallbackListener< RawFunctor >, 4 >
 
- Protected Member Functions inherited from hal::impl::SimCallbackRegistryBase
int32_t DoRegister (RawFunctor callback, void *param)
 
LLVM_ATTRIBUTE_ALWAYS_INLINE void DoReset ()
 
- Protected Attributes inherited from hal::impl::SimCallbackRegistryBase
wpi::recursive_spinlock m_mutex
 
std::unique_ptr< CallbackVectorm_callbacks
 

Detailed Description

template<typename CallbackFunction, const char *(*)() GetName>
class hal::SimCallbackRegistry< CallbackFunction, GetName >

Simulation callback registry.

Provides callback functionality.

Template Parameters
CallbackFunctioncallback function type (e.g. HAL_BufferCallback)
GetNamefunction that returns a const char* for the name

Member Function Documentation

◆ Invoke()

template<typename CallbackFunction , const char *(*)() GetName>
template<typename... U>
void hal::SimCallbackRegistry< CallbackFunction, GetName >::Invoke ( U &&...  u) const
inline

◆ operator()()

template<typename CallbackFunction , const char *(*)() GetName>
template<typename... U>
LLVM_ATTRIBUTE_ALWAYS_INLINE void hal::SimCallbackRegistry< CallbackFunction, GetName >::operator() ( U &&...  u) const
inline

◆ Register()

template<typename CallbackFunction , const char *(*)() GetName>
int32_t hal::SimCallbackRegistry< CallbackFunction, GetName >::Register ( CallbackFunction  callback,
void *  param 
)
inline

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