|
WPILibC++
2020.3.2
|
The DigitalHandleResource class is a way to track handles. More...
#include <DigitalHandleResource.h>
Public Member Functions | |
| DigitalHandleResource (const DigitalHandleResource &)=delete | |
| DigitalHandleResource & | operator= (const DigitalHandleResource &)=delete |
| THandle | Allocate (int16_t index, HAL_HandleEnum enumValue, int32_t *status) |
| std::shared_ptr< TStruct > | Get (THandle handle, HAL_HandleEnum enumValue) |
| void | Free (THandle handle, HAL_HandleEnum enumValue) |
| void | ResetHandles () override |
Public Member Functions inherited from hal::HandleBase | |
| HandleBase (const HandleBase &)=delete | |
| HandleBase & | operator= (const HandleBase &)=delete |
Friends | |
| class | DigitalHandleResourceTest |
Additional Inherited Members | |
Static Public Member Functions inherited from hal::HandleBase | |
| static void | ResetGlobalHandles () |
Protected Attributes inherited from hal::HandleBase | |
| int16_t | m_version |
The DigitalHandleResource class is a way to track handles.
This version allows a limited number of handles that are allocated by index. The enum value is seperate, as 2 enum values are allowed per handle Because they are allocated by index, each individual index holds its own mutex, which reduces contention heavily.]
| THandle | The Handle Type (Must be typedefed from HAL_Handle) |
| TStruct | The struct type held by this resource |
| size | The number of resources allowed to be allocated |