|
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.
|
|
Parent class for all devices.
ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::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.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once on this device in the robot program. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequencies. Alternatively, remove this method call, redeploy the robot application, and power-cycle the device on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
- Parameters
-
optimizedFreqHz | The update frequency to apply to the optimized status signals. A frequency of 0 Hz (default) will turn off the signals. Otherwise, the minimum supported signal frequency is 4 Hz. |
timeoutSeconds | Maximum amount of time to wait for each status frame when performing the action |
- Returns
- Status code of the first failed update frequency set call, or OK if all succeeded
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
devices | Devices for which to optimize bus utilization, passed as an array of device addresses. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
devices | Devices for which to optimize bus utilization, passed as a vector or initializer list of device addresses. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>>
static ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::OptimizeBusUtilizationForAll |
( |
Devices &... | devices | ) |
|
|
inlinestatic |
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
devices | Devices for which to optimize bus utilization, passed as a comma-separated list of device references. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
template<size_t N>
static ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::OptimizeBusUtilizationForAll |
( |
units::frequency::hertz_t | optimizedFreqHz, |
|
|
const std::array< ParentDevice *, N > & | devices ) |
|
inlinestatic |
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
optimizedFreqHz | The update frequency to apply to the optimized status signals. A frequency of 0 Hz (default) will turn off the signals. Otherwise, the minimum supported signal frequency is 4 Hz. |
devices | Devices for which to optimize bus utilization, passed as an array of device addresses. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
static ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::OptimizeBusUtilizationForAll |
( |
units::frequency::hertz_t | optimizedFreqHz, |
|
|
const std::vector< ParentDevice * > & | devices ) |
|
inlinestatic |
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
optimizedFreqHz | The update frequency to apply to the optimized status signals. A frequency of 0 Hz (default) will turn off the signals. Otherwise, the minimum supported signal frequency is 4 Hz. |
devices | Devices for which to optimize bus utilization, passed as a vector or initializer list of device addresses. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>>
static ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::OptimizeBusUtilizationForAll |
( |
units::frequency::hertz_t | optimizedFreqHz, |
|
|
Devices &... | devices ) |
|
inlinestatic |
Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
All status signals that have not been explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.
This function only needs to be called once in the robot program for the provided devices. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.
To restore the default status update frequencies, call ResetSignalFrequenciesForAll. Alternatively, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. The user can also override individual status update frequencies using BaseStatusSignal::SetUpdateFrequency.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
optimizedFreqHz | The update frequency to apply to the optimized status signals. A frequency of 0 Hz (default) will turn off the signals. Otherwise, the minimum supported signal frequency is 4 Hz. |
devices | Devices for which to optimize bus utilization, passed as a comma-separated list of device references. |
- Returns
- Status code of the first failed optimize call, or OK if all succeeded
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>>
static ctre::phoenix::StatusCode ctre::phoenix6::hardware::ParentDevice::ResetSignalFrequenciesForAll |
( |
Devices &... | devices | ) |
|
|
inlinestatic |
Resets the update frequencies of all the devices' status signals to the defaults.
This restores the default update frequency of all status signals, including status signals explicitly given an update frequency using BaseStatusSignal::SetUpdateFrequency and status signals optimized out using OptimizeBusUtilizationForAll.
This will wait up to 0.100 seconds (100ms) for each status frame.
- Parameters
-
devices | Devices for which to restore default update frequencies, passed as a comma-separated list of device references. |
- Returns
- Status code of the first failed restore call, or OK if all succeeded