[][src]Struct wpilib::PowerDistributionPanel

pub struct PowerDistributionPanel { /* fields omitted */ }

An interface to the PDP for getting information about robot power.

Methods

impl PowerDistributionPanel
[src]

pub fn new() -> HalResult<PowerDistributionPanel>
[src]

Initalizes a PDP using the default module, which is 0, according to WPILibC.

pub fn new_with_module(module: i32) -> HalResult<PowerDistributionPanel>
[src]

Create a new PDP interface on the specified module.

pub fn voltage(&self) -> HalMaybe<f64>
[src]

Get the voltage going into the PDP.

pub fn temperature(&self) -> HalMaybe<f64>
[src]

Get the PDP's temperature, in degrees Celsius.

Errors

The HalMaybe returned will have an error most commonly in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn current(&self, channel: i32) -> HalMaybe<f64>
[src]

Get the current on a specific channel on the PDP, in amps.

Errrors

If channel is invalid, the return value will contain NAN and `HalError(0).

The HalMaybe returned will have an error most commonly in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn total_current(&self) -> HalMaybe<f64>
[src]

Get the total current drawn from the PDP, in amps.

Errors

The HalMaybe returned will have an error most commonly in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn total_power(&self) -> HalMaybe<f64>
[src]

Get the total power drawn from the PDP, in watts.

Errors

The HalMaybe returned will have an error most commonly in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn total_energy(&self) -> HalMaybe<f64>
[src]

Get the total energy expended by the PDP, in joules.

Errors

The HalMaybe returned will have an error most commonly in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn reset_total_energy(&self) -> HalResult<()>
[src]

Reset the total energy count so far to zero.

Errors

Errors in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

pub fn clear_sticky_faults(&self) -> HalResult<()>
[src]

Clear sticky faults in the PDP.

Errors

Errors in the case of a CAN timeout. (In Fact, this is the only error WPILib will ever report!).

Trait Implementations

impl Debug for PowerDistributionPanel
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]