| IRremoteESP8266
    | 
Base class for handling common support for Argo remote protocols (functionality is shared across WREM-2 and WREM-3 IR protocols) More...
#include <ir_Argo.h>

| Public Member Functions | |
| IRArgoACBase (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
| Class constructor.  More... | |
| void | send (const uint16_t repeat=kArgoDefaultRepeat) | 
| Send the current internal state as an IR message.  More... | |
| int8_t | calibrate (void) | 
| Run the calibration to calculate uSec timing offsets for this platform.  More... | |
| void | begin (void) | 
| Set up hardware to be able to send a message.  More... | |
| void | on (void) | 
| Set the internal state to have the power on.  More... | |
| void | off (void) | 
| Set the internal state to have the power off.  More... | |
| void | setPower (const bool on) | 
| Set the internal state to have the desired power.  More... | |
| bool | getPower (void) const | 
| Get the power setting from the internal state.  More... | |
| void | setTemp (const uint8_t degrees) | 
| Set the temperature.  More... | |
| uint8_t | getTemp (void) const | 
| Get the current temperature setting.  More... | |
| void | setSensorTemp (const uint8_t degrees) | 
| Set the value for the current room temperature.  More... | |
| uint8_t | getSensorTemp (void) const | 
| Get the currently stored value for the room temperature setting.  More... | |
| void | setFan (const argoFan_t fan) | 
| Set the desired fan mode (WREM3).  More... | |
| void | setFanEx (const argoFan_t fan) | 
| argoFan_t | getFanEx (void) const | 
| -Exfor backw. compat w/IRArgoACMore... | |
| void | setFlap (const argoFlap_t flap) | 
| Set the desired flap mode.  More... | |
| void | setFlapEx (const argoFlap_t flap) | 
| argoFlap_t | getFlapEx (void) const | 
| -Exfor backw. compat w/IRArgoACMore... | |
| void | setMode (const argoMode_t mode) | 
| Set the desired operation mode.  More... | |
| void | setModeEx (const argoMode_t mode) | 
| argoMode_t | getModeEx (void) const | 
| -Exfor backw. compat w/IRArgoACMore... | |
| void | setMax (const bool on) | 
| Control the current Max setting. (i.e. Turbo)  More... | |
| bool | getMax (void) const | 
| Is the Max (i.e. Turbo) setting on?  More... | |
| void | setNight (const bool on) | 
| Turn on/off the Night mode. i.e. Sleep.  More... | |
| bool | getNight (void) const | 
| Get the status of Night mode. i.e. Sleep.  More... | |
| void | setiFeel (const bool on) | 
| Turn on/off the iFeel mode.  More... | |
| bool | getiFeel (void) const | 
| Get the status of iFeel mode.  More... | |
| void | setMessageType (const argoIrMessageType_t msgType) | 
| Set the message type of the next command (setting this resets state)  More... | |
| argoIrMessageType_t | getMessageType (void) const | 
| Get the message type.  More... | |
| uint8_t * | getRaw (void) | 
| Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.  More... | |
| uint16_t | getRawByteLength () const | 
| Get actual raw state byte length for the current state.  More... | |
| void | setRaw (const uint8_t state[], const uint16_t length) | 
| Set the raw state of the object.  More... | |
| Static Public Member Functions | |
| static argoIrMessageType_t | getMessageType (const uint8_t state[], const uint16_t length) | 
| Get message type from raw WREM-3 data.  More... | |
| static uint16_t | getStateLengthForIrMsgType (argoIrMessageType_t type) | 
| Get byte length of raw WREM-3 message based on IR cmd type.  More... | |
| static bool | validChecksum (const uint8_t state[], const uint16_t length) | 
| Verify the checksum is valid for a given state.  More... | |
| static argoMode_t | convertMode (const stdAc::opmode_t mode) | 
| Convert a stdAc::opmode_t enum into its native mode.  More... | |
| static argoFan_t | convertFan (const stdAc::fanspeed_t speed) | 
| Convert a stdAc::fanspeed_t enum into it's native speed.  More... | |
| static argoFlap_t | convertSwingV (const stdAc::swingv_t position) | 
| Convert a stdAc::swingv_t enum into it's native setting.  More... | |
| static argoIrMessageType_t | convertCommand (const stdAc::ac_command_t command) | 
| Convert a stdAc::ac_command_t enum into its native message type.  More... | |
| Protected Member Functions | |
| void | _stateReset (ARGO_PROTOCOL_T *state, argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL) | 
| void | stateReset (argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL) | 
| Reset the internals of the object to a known good state.  More... | |
| void | _checksum (ARGO_PROTOCOL_T *state) | 
| void | checksum (void) | 
| Update the checksum for the internal state.  More... | |
| Static Protected Member Functions | |
| static uint16_t | getRawByteLength (const ARGO_PROTOCOL_T &raw, argoIrMessageType_t messageTypeHint=argoIrMessageType_t::AC_CONTROL) | 
| static uint8_t | calcChecksum (const uint8_t state[], const uint16_t length) | 
| Calculate the checksum for a given state (WREM-3).  More... | |
| static uint8_t | getChecksum (const uint8_t state[], const uint16_t length) | 
| Retrieve the checksum value from transmitted state.  More... | |
| static stdAc::opmode_t | toCommonMode (const argoMode_t mode) | 
| Convert a native mode into its stdAc equivalent.  More... | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const argoFan_t speed) | 
| Convert a native fan speed into its stdAc equivalent.  More... | |
| static stdAc::swingv_t | toCommonSwingV (const uint8_t position) | 
| Convert a native flap mode into its stdAc equivalent (WREM3).  More... | |
| static stdAc::ac_command_t | toCommonCommand (const argoIrMessageType_t command) | 
| Convert a native message type into its stdAc equivalent.  More... | |
| Protected Attributes | |
| ARGO_PROTOCOL_T | _ | 
| The raw protocol data.  More... | |
| uint16_t | _length = kArgoStateLength | 
| argoIrMessageType_t | _messageType = argoIrMessageType_t::AC_CONTROL | 
| IRsend | _irsend | 
| instance of the IR send class  More... | |
| Related Functions | |
| (Note that these are not member functions.) | |
| template<> | |
| uint16_t | getRawByteLength (const ArgoProtocol &, argoIrMessageType_t messageType) | 
| Get actual raw state byte length for the current state _param 1st param ignored: WREM-2 does not caryy type in payload, allegedly.  More... | |
| template<> | |
| uint16_t | getRawByteLength (const ArgoProtocolWREM3 &raw, argoIrMessageType_t) | 
| Get actual raw state byte length for the current state.  More... | |
| template<> | |
| void | _checksum (ArgoProtocol *state) | 
| Update the checksum for a given state (WREM2).  More... | |
| template<> | |
| void | _checksum (ArgoProtocolWREM3 *state) | 
| Update the checksum for a given state (WREM3).  More... | |
| template<> | |
| void | _stateReset (ArgoProtocol *state, argoIrMessageType_t) | 
| Reset the given state to a known good state.  More... | |
| template<> | |
| void | _stateReset (ArgoProtocolWREM3 *state, argoIrMessageType_t messageType) | 
| Reset the given state to a known good state.  More... | |
Base class for handling common support for Argo remote protocols (functionality is shared across WREM-2 and WREM-3 IR protocols)
ArgoProtocol and ArgoProtocolWREM3 | ARGO_PROTOCOL_T | The Raw device protocol/message used | 
| 
 | explicit | 
Class constructor.
| [in] | pin | GPIO to be used when sending. | 
| [in] | inverted | Is the output signal to be inverted? | 
| [in] | use_modulation | Is frequency modulation to be used? | 
| 
 | protected | 
| 
 | protected | 
| void IRArgoACBase< T >::begin | ( | void | ) | 
Set up hardware to be able to send a message.
| 
 | staticprotected | 
Calculate the checksum for a given state (WREM-3).
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | state | The array to calculate the checksum for. | 
| [in] | length | The size of the state. | 
| 
 | inline | 
Run the calibration to calculate uSec timing offsets for this platform.
| 
 | protected | 
Update the checksum for the internal state.
| 
 | static | 
Convert a stdAc::ac_command_t enum into its native message type.
| command | The enum to be converted. | 
| 
 | static | 
Convert a stdAc::fanspeed_t enum into it's native speed.
| [in] | speed | The enum to be converted. | 
| 
 | static | 
Convert a stdAc::opmode_t enum into its native mode.
| [in] | mode | The enum to be converted. | 
| 
 | static | 
Convert a stdAc::swingv_t enum into it's native setting.
| [in] | position | The enum to be converted. | 
| 
 | staticprotected | 
Retrieve the checksum value from transmitted state.
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | state | Raw state | 
| length | Length of statein bytes | 
| argoFan_t getFanEx | ( | void | ) | const | 
-Ex for backw. compat w/ IRArgoAC 
Get the current fan mode setting as a strongly typed value (WREM3).
Get the current fan mode setting as a strongly typed value (WREM2).
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | argoFlap_t IRArgoACBase< T >::getFlapEx | ( | void | ) | const | 
-Ex for backw. compat w/ IRArgoAC 
Get Flap (VSwing) value as a strongly-typed value.
getFlapEx() method has been introduced to be able to retain old implementation of getFlap() for IRArgoAc which used uint8_t | bool IRArgoACBase< T >::getiFeel | ( | void | ) | const | 
Get the status of iFeel mode.
| bool IRArgoACBase< T >::getMax | ( | void | ) | const | 
Is the Max (i.e. Turbo) setting on?
| 
 | static | 
Get message type from raw WREM-3 data.
| state | The raw IR data | 
| length | Length of state(in byte) | 
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function <ARGO_PROTOCOL_T> | argoIrMessageType_t IRArgoACBase< T >::getMessageType | ( | void | ) | const | 
Get the message type.
| argoMode_t getModeEx | ( | void | ) | const | 
-Ex for backw. compat w/ IRArgoAC 
Get the current operation mode setting.
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function getModeEx() method has been introduced to be able to retain old implementation of getMode() for IRArgoAc which used uint8_t <ARGO_PROTOCOL_T>ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function. getModeEx() method has been introduced to be able to retain old implementation of getMode() for IRArgoAc which used uint8_t <ARGO_PROTOCOL_T> | bool IRArgoACBase< T >::getNight | ( | void | ) | const | 
Get the status of Night mode. i.e. Sleep.
| bool getPower | ( | void | ) | const | 
Get the power setting from the internal state.
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | uint8_t * IRArgoACBase< T >::getRaw | ( | void | ) | 
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
| uint16_t IRArgoACBase< T >::getRawByteLength | 
Get actual raw state byte length for the current state.
| 
 | staticprotected | 
| uint8_t IRArgoACBase< T >::getSensorTemp | ( | void | ) | const | 
Get the currently stored value for the room temperature setting.
sensor or roomTemp value | 
 | static | 
Get byte length of raw WREM-3 message based on IR cmd type.
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | type | The type of IR command | 
| uint8_t IRArgoACBase< T >::getTemp | ( | void | ) | const | 
Get the current temperature setting.
| void IRArgoACBase< T >::off | ( | void | ) | 
Set the internal state to have the power off.
| void IRArgoACBase< T >::on | ( | void | ) | 
Set the internal state to have the power on.
| void IRArgoACBase< T >::send | ( | const uint16_t | repeat = kArgoDefaultRepeat | ) | 
Send the current internal state as an IR message.
| [in] | repeat | Nr. of times the message will be repeated. | 
| void setFan | ( | const argoFan_t | fan | ) | 
Set the desired fan mode (WREM3).
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | fan | The desired fan speed. <ARGO_PROTOCOL_T> | 
| 
 | inline | 
| void IRArgoACBase< T >::setFlap | ( | const argoFlap_t | flap | ) | 
Set the desired flap mode.
| [in] | flap | The desired flap mode. | 
| 
 | inline | 
| void IRArgoACBase< T >::setiFeel | ( | const bool | on | ) | 
Turn on/off the iFeel mode.
| [in] | on | The desired setting. | 
| void IRArgoACBase< T >::setMax | ( | const bool | on | ) | 
Control the current Max setting. (i.e. Turbo)
| [in] | on | The desired setting. | 
| void IRArgoACBase< T >::setMessageType | ( | const argoIrMessageType_t | msgType | ) | 
Set the message type of the next command (setting this resets state)
| msgType | The message type to set | 
| void setMode | ( | const argoMode_t | mode | ) | 
Set the desired operation mode.
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | mode | The desired operation mode. <ARGO_PROTOCOL_T> | 
| 
 | inline | 
| void IRArgoACBase< T >::setNight | ( | const bool | on | ) | 
Turn on/off the Night mode. i.e. Sleep.
| [in] | on | The desired setting. | 
| void setPower | ( | const bool | on | ) | 
Set the internal state to have the desired power.
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | on | The desired power state. <ARGO_PROTOCOL_T> | 
| void IRArgoACBase< T >::setRaw | ( | const uint8_t | state[], | 
| const uint16_t | length | ||
| ) | 
Set the raw state of the object.
| [in] | state | The raw state from the native IR message. | 
| [in] | length | The length of raw state in bytes. | 
| void IRArgoACBase< T >::setSensorTemp | ( | const uint8_t | degrees | ) | 
Set the value for the current room temperature.
sensor or roomTemp value | [in] | degrees | The temperature in degrees celsius. | 
| void IRArgoACBase< T >::setTemp | ( | const uint8_t | degrees | ) | 
Set the temperature.
| [in] | degrees | The temperature in degrees celsius. | 
| 
 | protected | 
Reset the internals of the object to a known good state.
| messageType | Type of message to reset the state for | 
| 
 | staticprotected | 
| 
 | staticprotected | 
| 
 | staticprotected | 
| 
 | staticprotected | 
Convert a native flap mode into its stdAc equivalent (WREM3).
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in] | position | The native setting to be converted. | 
| 
 | static | 
Verify the checksum is valid for a given state.
| [in] | state | The array to verify the checksum of. | 
| [in] | length | The size of the state. | 
| 
 | related | 
Update the checksum for a given state (WREM2).
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function | [in,out] | state | Pointer to a binary representation of the A/C state. <ARGO_PROTOCOL_T> | 
| 
 | related | 
Update the checksum for a given state (WREM3).
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in,out] | state | Pointer to a binary representation of the A/C state. <ARGO_PROTOCOL_T> | 
| 
 | related | 
Reset the given state to a known good state.
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function | [in,out] | state | Pointer to a binary representation of the A/C state. _param 2nd param unused (always resets to AC_CONTROL state) <ARGO_PROTOCOL_T> | 
| 
 | related | 
Reset the given state to a known good state.
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function | [in,out] | state | Pointer to a binary representation of the A/C state. | 
| messageType | Type of message to reset the state for <ARGO_PROTOCOL_T> | 
| 
 | related | 
Get actual raw state byte length for the current state _param 1st param ignored: WREM-2 does not caryy type in payload, allegedly.
| messageType | Type of message the state is carrying | 
ArgoProtocol type and while it semantically belongs to IrArgoAC class impl., it has not been pushed there, to avoid having to use a virtual function <ARGO_PROTOCOL_T> | 
 | related | 
Get actual raw state byte length for the current state.
| raw | The raw state _param 2nd param ignored (1st byte of rawis sufficient to get len) | 
ArgoProtocolWREM3 type and while it semantically belongs to IrArgoAC_WREM3 class impl., it has not been pushed there, to avoid having to use a virtual function <ARGO_PROTOCOL_T> | 
 | protected | 
The raw protocol data.
| 
 | protected | 
instance of the IR send class
| 
 | protected | 
| 
 | protected | 
 1.8.17
 1.8.17