#include <Compressor.h>
Public Member Functions | |
Compressor (unsigned pressureSwitchChannel, unsigned compressorRelayChannel) | |
Compressor (unsigned pressureSwitchSlot, unsigned pressureSwitchChannel, unsigned compresssorRelaySlot, unsigned compressorRelayChannel) | |
~Compressor (void) | |
void | Start (void) |
void | Stop (void) |
bool | Enabled (void) |
unsigned | GetPressureSwitchValue (void) |
void | SetRelayValue (Relay::Value relayValue) |
Compressor::Compressor | ( | unsigned | pressureSwitchChannel, | |
unsigned | compressorRelayChannel | |||
) |
Compressor constructor. Given a relay channel and pressure switch channel (both in the default digital module), initialize the Compressor object.
pressureSwitchChannel | The GPIO channel that the pressure switch is attached to. | |
compressorRelayChannel | The relay channel that the compressor relay is attached to. |
Compressor::Compressor | ( | unsigned | pressureSwitchSlot, | |
unsigned | pressureSwitchChannel, | |||
unsigned | compresssorRelaySlot, | |||
unsigned | compressorRelayChannel | |||
) |
Compressor constructor. Given a fully specified relay channel and pressure switch channel, initialize the Compressor object.
pressureSwitchSlot | The module that the pressure switch is attached to. | |
pressureSwitchChannel | The GPIO channel that the pressure switch is attached to. | |
compresssorRelaySlot | The module that the compressor relay is attached to. | |
compressorRelayChannel | The relay channel that the compressor relay is attached to. |
Compressor::~Compressor | ( | void | ) |
Delete the Compressor object. Delete the allocated resources for the compressor and kill the compressor task that is polling the pressure switch.
void Compressor::Start | ( | void | ) |
Start the compressor. This method will allow the polling loop to actually operate the compressor.
void Compressor::Stop | ( | void | ) |
Stop the compressor. This method will stop the compressor from turning on.
bool Compressor::Enabled | ( | void | ) |
Get the state of the enabled flag. Return the state of the enabled flag for the compressor and pressure switch combination.
unsigned Compressor::GetPressureSwitchValue | ( | void | ) |
Get the pressure switch value. Read the pressure switch digital input.
void Compressor::SetRelayValue | ( | Relay::Value | relayValue | ) |
Operate the relay for the compressor. Change the value of the relay output that is connected to the compressor motor. This is only intended to be called by the internal polling thread.