public final class PDP extends java.lang.Object implements UpdatingSendable
| Modifier and Type | Class and Description |
|---|---|
static class |
PDP.PowerChannel
The Enum PowerChannel.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
m_channelMap
The m_update channels.
|
private static PDP |
m_instance
The Constant m_instance.
|
private ITable |
m_table
The m_table.
|
static int |
MAX_POWER_CHANNELS
Number of PDP channels.
|
| Modifier | Constructor and Description |
|---|---|
private |
PDP()
Instantiates a PDP.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
claimChannel(PDP.PowerChannel channel,
java.lang.String name)
Sets the channel name.
|
private double |
getChannelCurrent(int channel)
Gets the current.
|
static java.lang.String |
getChannelName(PDP.PowerChannel channel)
Gets the channel name.
|
static double |
getCurrent(PDP.PowerChannel channel)
Gets the current.
|
static PDP |
getInstance()
Gets the single instance of PDP.
|
java.lang.String |
getSmartDashboardType() |
ITable |
getTable() |
static double |
getTemperature()
Gets the temperature.
|
static double |
getTotalCurrent()
Gets the total current.
|
static double |
getTotalEnergy()
Gets the total energy.
|
static double |
getTotalPower()
Gets the total power.
|
static double |
getVoltage()
Gets the voltage.
|
static void |
initialize() |
void |
initTable(ITable subtable) |
static void |
resetFaults()
Reset faults.
|
static void |
resetTotalEnergy()
Reset total energy.
|
void |
updateTable()
Update the table for this object with the latest values.
|
public static final int MAX_POWER_CHANNELS
private static PDP m_instance
private static final java.lang.String[] m_channelMap
private ITable m_table
public static void initialize()
public static PDP getInstance()
public static java.lang.String getChannelName(PDP.PowerChannel channel)
channel - the channelpublic static void claimChannel(PDP.PowerChannel channel, java.lang.String name)
channel - the channelname - the namepublic static double getVoltage()
public static double getTemperature()
public static double getCurrent(PDP.PowerChannel channel)
channel - the channelprivate double getChannelCurrent(int channel)
channel - the channelpublic static double getTotalCurrent()
public static double getTotalPower()
public static double getTotalEnergy()
public static void resetTotalEnergy()
public static void resetFaults()
public java.lang.String getSmartDashboardType()
getSmartDashboardType in interface Sendablepublic void updateTable()
updateTable in interface UpdatingSendable