|
| CANdi (int deviceId, std::string canbus="") |
| Constructs a new CANdi object.
|
|
| CANdi (int deviceId, CANBus canbus) |
| Constructs a new CANdi object.
|
|
| ~CANdi () |
|
void | InitSendable (wpi::SendableBuilder &builder) override |
|
| CoreCANdi (int deviceId, std::string canbus="") |
| Constructs a new CANdi object.
|
|
| CoreCANdi (int deviceId, CANBus canbus) |
| Constructs a new CANdi object.
|
|
configs::CANdiConfigurator & | GetConfigurator () |
| Gets the configurator for this CANdi.
|
|
configs::CANdiConfigurator const & | GetConfigurator () const |
| Gets the configurator for this CANdi.
|
|
sim::CANdiSimState & | GetSimState () |
| Get the simulation state for this device.
|
|
StatusSignal< int > & | GetVersionMajor (bool refresh=true) |
| App Major Version number.
|
|
StatusSignal< int > & | GetVersionMinor (bool refresh=true) |
| App Minor Version number.
|
|
StatusSignal< int > & | GetVersionBugfix (bool refresh=true) |
| App Bugfix Version number.
|
|
StatusSignal< int > & | GetVersionBuild (bool refresh=true) |
| App Build Version number.
|
|
StatusSignal< int > & | GetVersion (bool refresh=true) |
| Full Version of firmware in device.
|
|
StatusSignal< int > & | GetFaultField (bool refresh=true) |
| Integer representing all fault flags reported by the device.
|
|
StatusSignal< int > & | GetStickyFaultField (bool refresh=true) |
| Integer representing all (persistent) sticky fault flags reported by the device.
|
|
StatusSignal< bool > & | GetIsProLicensed (bool refresh=true) |
| Whether the device is Phoenix Pro licensed.
|
|
StatusSignal< signals::S1StateValue > & | GetS1State (bool refresh=true) |
| State of the Signal 1 input (S1IN).
|
|
StatusSignal< signals::S2StateValue > & | GetS2State (bool refresh=true) |
| State of the Signal 2 input (S2IN).
|
|
StatusSignal< units::angle::turn_t > & | GetQuadraturePosition (bool refresh=true) |
| Position from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.
|
|
StatusSignal< units::time::microsecond_t > & | GetPWM1RiseToRise (bool refresh=true) |
| Measured rise to rise time of the PWM signal at the S1 input of CANdi.
|
|
StatusSignal< units::angle::turn_t > & | GetPWM1Position (bool refresh=true) |
| Measured position of the PWM sensor at the S1 input of CANdi.
|
|
StatusSignal< units::angular_velocity::turns_per_second_t > & | GetPWM1Velocity (bool refresh=true) |
| Measured velocity of the PWM sensor at the S1 input of CANdi.
|
|
StatusSignal< units::time::microsecond_t > & | GetPWM2RiseToRise (bool refresh=true) |
| Measured rise to rise time of the PWM signal at the S2 input of CANdi.
|
|
StatusSignal< units::angle::turn_t > & | GetPWM2Position (bool refresh=true) |
| Measured position of the PWM sensor at the S2 input of CANdi.
|
|
StatusSignal< bool > & | GetOvercurrent (bool refresh=true) |
| True when the CANdi is in overcurrent protection mode.
|
|
StatusSignal< units::voltage::volt_t > & | GetSupplyVoltage (bool refresh=true) |
| Measured supply voltage to the CANdi.
|
|
StatusSignal< units::current::ampere_t > & | GetOutputCurrent (bool refresh=true) |
| Measured output current.
|
|
StatusSignal< units::angular_velocity::turns_per_second_t > & | GetPWM2Velocity (bool refresh=true) |
| Measured velocity of the PWM sensor at the S2 input of CANdi.
|
|
StatusSignal< units::angular_velocity::turns_per_second_t > & | GetQuadratureVelocity (bool refresh=true) |
| Velocity from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.
|
|
StatusSignal< bool > & | GetS1Closed (bool refresh=true) |
| True if the Signal 1 input (S1IN) matches the configured S1 Closed State.
|
|
StatusSignal< bool > & | GetS2Closed (bool refresh=true) |
| True if the Signal 2 input (S2IN) matches the configured S2 Closed State.
|
|
StatusSignal< bool > & | GetFault_Hardware (bool refresh=true) |
| Hardware fault occurred.
|
|
StatusSignal< bool > & | GetStickyFault_Hardware (bool refresh=true) |
| Hardware fault occurred.
|
|
StatusSignal< bool > & | GetFault_Undervoltage (bool refresh=true) |
| Device supply voltage dropped to near brownout levels.
|
|
StatusSignal< bool > & | GetStickyFault_Undervoltage (bool refresh=true) |
| Device supply voltage dropped to near brownout levels.
|
|
StatusSignal< bool > & | GetFault_BootDuringEnable (bool refresh=true) |
| Device boot while detecting the enable signal.
|
|
StatusSignal< bool > & | GetStickyFault_BootDuringEnable (bool refresh=true) |
| Device boot while detecting the enable signal.
|
|
StatusSignal< bool > & | GetFault_UnlicensedFeatureInUse (bool refresh=true) |
| An unlicensed feature is in use, device may not behave as expected.
|
|
StatusSignal< bool > & | GetStickyFault_UnlicensedFeatureInUse (bool refresh=true) |
| An unlicensed feature is in use, device may not behave as expected.
|
|
StatusSignal< bool > & | GetFault_5V (bool refresh=true) |
| CANdi has detected a 5V fault.
|
|
StatusSignal< bool > & | GetStickyFault_5V (bool refresh=true) |
| CANdi has detected a 5V fault.
|
|
ctre::phoenix::StatusCode | SetControl (const controls::ControlRequest &request) |
| Control device with generic control request object.
|
|
ctre::phoenix::StatusCode | SetQuadraturePosition (units::angle::turn_t newValue, units::time::second_t timeoutSeconds) |
| Sets the position of the quadrature input.
|
|
ctre::phoenix::StatusCode | SetQuadraturePosition (units::angle::turn_t newValue) |
| Sets the position of the quadrature input.
|
|
ctre::phoenix::StatusCode | ClearStickyFaults (units::time::second_t timeoutSeconds) |
| Clear the sticky faults in the device.
|
|
ctre::phoenix::StatusCode | ClearStickyFaults () |
| Clear the sticky faults in the device.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_Hardware (units::time::second_t timeoutSeconds) |
| Clear sticky fault: Hardware fault occurred.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_Hardware () |
| Clear sticky fault: Hardware fault occurred.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_Undervoltage (units::time::second_t timeoutSeconds) |
| Clear sticky fault: Device supply voltage dropped to near brownout levels.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_Undervoltage () |
| Clear sticky fault: Device supply voltage dropped to near brownout levels.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_BootDuringEnable (units::time::second_t timeoutSeconds) |
| Clear sticky fault: Device boot while detecting the enable signal.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_BootDuringEnable () |
| Clear sticky fault: Device boot while detecting the enable signal.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_UnlicensedFeatureInUse (units::time::second_t timeoutSeconds) |
| Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_UnlicensedFeatureInUse () |
| Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_5V (units::time::second_t timeoutSeconds) |
| Clear sticky fault: CANdi has detected a 5V fault.
|
|
ctre::phoenix::StatusCode | ClearStickyFault_5V () |
| Clear sticky fault: CANdi has detected a 5V fault.
|
|
| ParentDevice (int deviceID, std::string model, std::string canbus) |
|
virtual | ~ParentDevice ()=default |
|
| ParentDevice (ParentDevice const &)=delete |
|
ParentDevice & | operator= (ParentDevice const &)=delete |
|
int | GetDeviceID () const |
|
const std::string & | GetNetwork () const |
|
uint64_t | GetDeviceHash () const |
| Gets a number unique for this device's hardware type and ID.
|
|
std::shared_ptr< const controls::ControlRequest > | GetAppliedControl () const |
| Get the latest applied control.
|
|
std::shared_ptr< controls::ControlRequest > | GetAppliedControl () |
| Get the latest applied control.
|
|
bool | HasResetOccurred () |
|
std::function< bool()> | GetResetOccurredChecker () const |
|
bool | IsConnected (units::second_t maxLatencySeconds=500_ms) |
| Returns whether the device is still connected to the robot.
|
|
StatusSignal< double > & | GetGenericSignal (uint32_t signal, bool refresh=true) |
| This is a reserved routine for internal testing.
|
|
ctre::phoenix::StatusCode | OptimizeBusUtilization (units::frequency::hertz_t optimizedFreqHz=0_Hz, units::time::second_t timeoutSeconds=100_ms) |
| Optimizes the device's bus utilization by reducing the update frequencies of its status signals.
|
|
ctre::phoenix::StatusCode | ResetSignalFrequencies (units::time::second_t timeoutSeconds=100_ms) |
| Resets the update frequencies of all the device's status signals to the defaults.
|
|
|
using | Configuration = configs::CANdiConfiguration |
|
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>> |
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (Devices &... devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (const std::vector< ParentDevice * > &devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
template<size_t N> |
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (const std::array< ParentDevice *, N > &devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>> |
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, Devices &... devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, const std::vector< ParentDevice * > &devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
template<size_t N> |
static ctre::phoenix::StatusCode | OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, const std::array< ParentDevice *, N > &devices) |
| Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
|
|
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>> |
static ctre::phoenix::StatusCode | ResetSignalFrequenciesForAll (Devices &... devices) |
| Resets the update frequencies of all the devices' status signals to the defaults.
|
|
static ctre::phoenix::StatusCode | ResetSignalFrequenciesForAll (const std::vector< ParentDevice * > &devices) |
| Resets the update frequencies of all the devices' status signals to the defaults.
|
|
template<size_t N> |
static ctre::phoenix::StatusCode | ResetSignalFrequenciesForAll (const std::array< ParentDevice *, N > &devices) |
| Resets the update frequencies of all the devices' status signals to the defaults.
|
|
virtual ctre::phoenix::StatusCode | SetControlPrivate (const controls::ControlRequest &request) |
|
template<typename T > |
StatusSignal< T > & | LookupStatusSignal (uint16_t spn, std::string signalName, bool reportOnConstruction, bool refresh) |
|
template<typename T > |
StatusSignal< T > & | LookupStatusSignal (uint16_t spn, std::function< std::map< uint16_t, std::string >()> mapFiller, std::string signalName, bool reportOnConstruction, bool refresh) |
|
template<typename T , typename U > |
StatusSignal< T > | LookupDimensionlessStatusSignal (uint16_t spn, std::string signalName, bool refresh) |
| Returns a unitless version of the StatusSignal by value.
|
|
DeviceIdentifier | deviceIdentifier |
|
static controls::EmptyControl | _emptyControl {} |
|
template<typename... Devices> |
static constexpr bool | is_all_device_v = is_all_device<Devices...>::value |
| Whether all types passed in are subclasses of ParentDevice.
|
|
Class for CANdi, a CAN digital input device that detects when a digital signal is asserted or deasserted.