86 return static_cast<int16_t
>(handle & 0xffff);
121 return (((handle & 0xFF0000) >> 16) & version) == version;
140#if !defined(__FRC_SYSTEMCORE__)
Base for all HAL Handles.
Definition HandlesInternal.h:28
HandleBase & operator=(const HandleBase &)=delete
virtual void ResetHandles()
static void ResetGlobalHandles()
HandleBase(const HandleBase &)=delete
int16_t m_version
Definition HandlesInternal.h:38
int32_t HAL_Handle
Definition Types.h:17
WPILib Hardware Abstraction Layer (HAL) namespace.
Definition SimCallbackRegistry.h:16
static bool isHandleCorrectVersion(HAL_Handle handle, int16_t version)
Get if the version of the handle is correct.
Definition HandlesInternal.h:120
HAL_HandleEnum
Enum of HAL handle types.
Definition HandlesInternal.h:46
HAL_Handle createHandle(int16_t index, HAL_HandleEnum handleType, int16_t version)
Create a handle for a specific index, type and version.
constexpr int16_t InvalidHandleIndex
Definition HandlesInternal.h:41
static bool isHandleType(HAL_Handle handle, HAL_HandleEnum handleType)
Get if the handle is a specific type.
Definition HandlesInternal.h:107
static HAL_HandleEnum getHandleType(HAL_Handle handle)
Get the handle type from a handle.
Definition HandlesInternal.h:95
static int16_t getHandleIndex(HAL_Handle handle)
Get the handle index from a handle.
Definition HandlesInternal.h:84
int16_t getHandleTypedIndex(HAL_Handle handle, HAL_HandleEnum enumType, int16_t version)
Get if the handle is a correct type and version.
Definition HandlesInternal.h:135
constexpr int kHandleTypeHALBase
Definition Synchronization.h:45