Files
allwpilib/wpilibc/wpilibC++/include/PCMCompressor.h
thomasclark bb50f4b134 C++ testing
Made a toplevel directory for C++ and C++ tests

Change-Id: I4bc2074a7036ec7fe79568b411637a5bee9eb5b3

Added the C++ testing framework and one test

Change-Id: I1e80a1e16b251a49666820a9d4c8caa025da9785
2014-06-02 15:36:18 -04:00

56 lines
1.1 KiB
C++

/*
* PCMCompressor.h
*/
#ifndef PCMCOMPRESSOR_H_
#define PCMCOMPRESSOR_H_
#include "HAL/HAL.hpp"
#include "SensorBase.h"
#include "tables/ITableListener.h"
#include "LiveWindow/LiveWindowSendable.h"
/**
* CAN pneumatic control module compressor
*
* Created on: May 28, 2014
* Author: Thomas Clark
*
*/
class PCMCompressor: public SensorBase, public LiveWindowSendable, public ITableListener {
public:
PCMCompressor(uint8_t module);
PCMCompressor();
~PCMCompressor();
void Start();
void Stop();
bool Enabled();
bool GetPressureSwitchValue();
float GetCompressorCurrent();
void SetClosedLoopControl(bool on);
bool GetClosedLoopControl();
void UpdateTable();
void StartLiveWindowMode();
void StopLiveWindowMode();
std::string GetSmartDashboardType();
void InitTable(ITable *subTable);
ITable *GetTable();
void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
protected:
void *m_pcm_pointer;
private:
void InitCompressor(uint8_t module);
void SetCompressor(bool on);
ITable *m_table;
};
#endif /* PCMCOMPRESSOR_H_ */