WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
HandlesInternal.hpp File Reference
#include <stdint.h>
#include "wpi/hal/Types.h"
#include "wpi/util/Synchronization.hpp"

Go to the source code of this file.

Classes

class  wpi::hal::HandleBase
 Base for all HAL Handles. More...

Namespaces

namespace  wpi
namespace  wpi::hal
 WPILib Hardware Abstraction Layer (HAL) namespace.

Enumerations

enum class  wpi::hal::HAL_HandleEnum {
  wpi::hal::Undefined = 0 , wpi::hal::DIO = wpi::util::kHandleTypeHALBase , wpi::hal::Port = 2 , wpi::hal::Notifier = 3 ,
  wpi::hal::Interrupt = 4 , wpi::hal::AnalogOutput = 5 , wpi::hal::AnalogInput = 6 , wpi::hal::AnalogTrigger = 7 ,
  wpi::hal::Relay = 8 , wpi::hal::PWM = 9 , wpi::hal::DigitalPWM = 10 , wpi::hal::Counter = 11 ,
  wpi::hal::FPGAEncoder = 12 , wpi::hal::Encoder = 13 , wpi::hal::Compressor = 14 , wpi::hal::Solenoid = 15 ,
  wpi::hal::AnalogGyro = 16 , wpi::hal::Vendor = 17 , wpi::hal::SimulationJni = 18 , wpi::hal::CAN = 19 ,
  wpi::hal::SerialPort = 20 , wpi::hal::DutyCycle = 21 , wpi::hal::DMA = 22 , wpi::hal::AddressableLED = 23 ,
  wpi::hal::CTREPCM = 24 , wpi::hal::CTREPDP = 25 , wpi::hal::REVPDH = 26 , wpi::hal::REVPH = 27 ,
  wpi::hal::CANStream = 28 , wpi::hal::Alert = 29
}
 Enum of HAL handle types. More...

Functions

static int16_t wpi::hal::getHandleIndex (HAL_Handle handle)
 Get the handle index from a handle.
static HAL_HandleEnum wpi::hal::getHandleType (HAL_Handle handle)
 Get the handle type from a handle.
static bool wpi::hal::isHandleType (HAL_Handle handle, HAL_HandleEnum handleType)
 Get if the handle is a specific type.
static bool wpi::hal::isHandleCorrectVersion (HAL_Handle handle, int16_t version)
 Get if the version of the handle is correct.
int16_t wpi::hal::getHandleTypedIndex (HAL_Handle handle, HAL_HandleEnum enumType, int16_t version)
 Get if the handle is a correct type and version.
HAL_Handle wpi::hal::createHandle (int16_t index, HAL_HandleEnum handleType, int16_t version)
 Create a handle for a specific index, type and version.

Variables

constexpr int16_t wpi::hal::InvalidHandleIndex = -1