mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Move CameraServer and WPILib headers into their own folder
The old headers were moved into folders because doing so avoids polluting the system include directories. Folder names were also normalized to lowercase.
This commit is contained in:
committed by
Peter Johnson
parent
31ced30c1e
commit
d89b7dd412
84
wpilibc/src/main/native/include/frc/PowerDistributionPanel.h
Normal file
84
wpilibc/src/main/native/include/frc/PowerDistributionPanel.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
#include "frc/smartdashboard/SendableBase.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Class for getting voltage, current, temperature, power and energy from the
|
||||
* CAN PDP.
|
||||
*/
|
||||
class PowerDistributionPanel : public ErrorBase, public SendableBase {
|
||||
public:
|
||||
PowerDistributionPanel();
|
||||
explicit PowerDistributionPanel(int module);
|
||||
|
||||
/**
|
||||
* Query the input voltage of the PDP.
|
||||
*
|
||||
* @return The voltage of the PDP in volts
|
||||
*/
|
||||
double GetVoltage() const;
|
||||
|
||||
/**
|
||||
* Query the temperature of the PDP.
|
||||
*
|
||||
* @return The temperature of the PDP in degrees Celsius
|
||||
*/
|
||||
double GetTemperature() const;
|
||||
|
||||
/**
|
||||
* Query the current of a single channel of the PDP.
|
||||
*
|
||||
* @return The current of one of the PDP channels (channels 0-15) in Amperes
|
||||
*/
|
||||
double GetCurrent(int channel) const;
|
||||
|
||||
/**
|
||||
* Query the total current of all monitored PDP channels (0-15).
|
||||
*
|
||||
* @return The the total current drawn from the PDP channels in Amperes
|
||||
*/
|
||||
double GetTotalCurrent() const;
|
||||
|
||||
/**
|
||||
* Query the total power drawn from the monitored PDP channels.
|
||||
*
|
||||
* @return The the total power drawn from the PDP channels in Watts
|
||||
*/
|
||||
double GetTotalPower() const;
|
||||
|
||||
/**
|
||||
* Query the total energy drawn from the monitored PDP channels.
|
||||
*
|
||||
* @return The the total energy drawn from the PDP channels in Joules
|
||||
*/
|
||||
double GetTotalEnergy() const;
|
||||
|
||||
/**
|
||||
* Reset the total energy drawn from the PDP.
|
||||
*
|
||||
* @see PowerDistributionPanel#GetTotalEnergy
|
||||
*/
|
||||
void ResetTotalEnergy();
|
||||
|
||||
/**
|
||||
* Remove all of the fault flags on the PDP.
|
||||
*/
|
||||
void ClearStickyFaults();
|
||||
|
||||
void InitSendable(SendableBuilder& builder) override;
|
||||
|
||||
private:
|
||||
int m_handle;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user