IRremoteESP8266

Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Related Functions | List of all members
IRArgoACBase< ARGO_PROTOCOL_T > Class Template Reference

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>`

Collaboration diagram for IRArgoACBase< ARGO_PROTOCOL_T >:
[legend]

## 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
| `-Ex` for backw. compat w/ `IRArgoAC` More...
void | setFlap (const argoFlap_t flap)
| Set the desired flap mode. More...
void | setFlapEx (const argoFlap_t flap)
argoFlap_t | getFlapEx (void) const
| `-Ex` for backw. compat w/ `IRArgoAC` More...
void | setMode (const argoMode_t mode)
| Set the desired operation mode. More...
void | setModeEx (const argoMode_t mode)
argoMode_t | getModeEx (void) const
| `-Ex` for backw. compat w/ `IRArgoAC` More...
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...

## Detailed Description

### template<typename ARGO_PROTOCOL_T>
class IRArgoACBase< ARGO_PROTOCOL_T >

Base class for handling common support for Argo remote protocols (functionality is shared across WREM-2 and WREM-3 IR protocols)

Note
  This class uses static polymorphism and full template specializations when required, to avoid a performance penalty of doing v-table lookup. 2 instantiations are forced in impl. file: for `ArgoProtocol` and `ArgoProtocolWREM3`
  This class is abstract (though does not declare a pure-virtual fn. for abovementioned reasons), and instead declares protected c-tor

Template Parameters

  ARGO_PROTOCOL_T | The Raw device protocol/message used

## Constructor & Destructor Documentation

## ◆ IRArgoACBase()

template<typename T >

IRArgoACBase< T >::IRArgoACBase | ( | const uint16_t | pin,
|  | const bool | inverted = `false`,
|  | const bool | use_modulation = `true`
| ) |  |
| explicit

Class constructor.

Parameters

  [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?

## Member Function Documentation

## ◆ _checksum()

template<typename ARGO_PROTOCOL_T >

void IRArgoACBase< ARGO_PROTOCOL_T >::_checksum | ( | ARGO_PROTOCOL_T * | state | ) |
| protected

## ◆ _stateReset()

template<typename ARGO_PROTOCOL_T >

void IRArgoACBase< ARGO_PROTOCOL_T >::_stateReset | ( | ARGO_PROTOCOL_T * | state,
|  | argoIrMessageType_t | messageType = `argoIrMessageType_t::AC_CONTROL`
| ) |  |
| protected

## ◆ begin()

template<typename T >

void IRArgoACBase< T >::begin | ( | void |  | ) |

Set up hardware to be able to send a message.

## ◆ calcChecksum()

template<typename ARGO_PROTOCOL_T >

uint8_t calcChecksum | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |
| static protected

Calculate the checksum for a given state (WREM-3).

Note
  This is a full specialization for `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

Parameters

  [in] | state | The array to calculate the checksum for.
  [in] | length | The size of the state.

Returns
  The 8-bit calculated result. <ARGO_PROTOCOL_T>

## ◆ calibrate()

template<typename ARGO_PROTOCOL_T >

int8_t IRArgoACBase< ARGO_PROTOCOL_T >::calibrate | ( | void |  | ) |
| inline

Run the calibration to calculate uSec timing offsets for this platform.

Returns
  The uSec timing offset needed per modulation of the IR Led.

Note
  This will produce a 65ms IR signal pulse at 38kHz. Only ever needs to be run once per object instantiation, if at all.

## ◆ checksum()

template<typename T >

void IRArgoACBase< T >::checksum | ( | void |  | ) |
| protected

Update the checksum for the internal state.

## ◆ convertCommand()

template<typename T >

argoIrMessageType_t IRArgoACBase< T >::convertCommand | ( | const stdAc::ac_command_t | command | ) |
| static

Convert a stdAc::ac_command_t enum into its native message type.

Parameters

  command | The enum to be converted.

Returns
  The native equivalent of the enum.

## ◆ convertFan()

template<typename T >

argoFan_t IRArgoACBase< T >::convertFan | ( | const stdAc::fanspeed_t | speed | ) |
| static

Convert a stdAc::fanspeed_t enum into it's native speed.

Parameters

  [in] | speed | The enum to be converted.

Returns
  The native equivalent of the enum.

## ◆ convertMode()

template<typename T >

argoMode_t IRArgoACBase< T >::convertMode | ( | const stdAc::opmode_t | mode | ) |
| static

Convert a stdAc::opmode_t enum into its native mode.

Parameters

  [in] | mode | The enum to be converted.

Returns
  The native equivalent of the enum.

## ◆ convertSwingV()

template<typename T >

argoFlap_t IRArgoACBase< T >::convertSwingV | ( | const stdAc::swingv_t | position | ) |
| static

Convert a stdAc::swingv_t enum into it's native setting.

Parameters

  [in] | position | The enum to be converted.

Returns
  The native equivalent of the enum.

## ◆ getChecksum()

template<typename ARGO_PROTOCOL_T >

uint8_t getChecksum | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |
| static protected

Retrieve the checksum value from transmitted state.

Note
  This is a full specialization for `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

Parameters

  [in] | state | Raw state
  | length | Length of `state` in bytes

Returns
  Checksum value (8-bit) <ARGO_PROTOCOL_T>

## ◆ getFanEx()

template<typename ARGO_PROTOCOL_T >

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).

Note
  This is a full specialization for `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

Returns
  The current fan mode. <ARGO_PROTOCOL_T>

Note
  This is a full specialization for `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

Returns
  The current fan mode. <ARGO_PROTOCOL_T>

## ◆ getFlapEx()

template<typename T >

argoFlap_t IRArgoACBase< T >::getFlapEx | ( | void |  | ) | const

`-Ex` for backw. compat w/ `IRArgoAC`

Get Flap (VSwing) value as a strongly-typed value.

Note
  This `getFlapEx()` method has been introduced to be able to retain old implementation of `getFlap()` for `IRArgoAc` which used uint8_t

Returns
  Flap setting

## ◆ getiFeel()

template<typename T >

bool IRArgoACBase< T >::getiFeel | ( | void |  | ) | const

Get the status of iFeel mode.

Returns
  true if on, false if off.

## ◆ getMax()

template<typename T >

bool IRArgoACBase< T >::getMax | ( | void |  | ) | const

Is the Max (i.e. Turbo) setting on?

Returns
  The current value.

## ◆ getMessageType() [1/2]

template<typename ARGO_PROTOCOL_T >

argoIrMessageType_t getMessageType | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |
| static

Get message type from raw WREM-3 data.

Parameters

  state | The raw IR data
  length | Length of `state` (in byte)

Returns
  IR message type

Note
  This is a full specialization for `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>

## ◆ getMessageType() [2/2]

template<typename T >

argoIrMessageType_t IRArgoACBase< T >::getMessageType | ( | void |  | ) | const

Get the message type.

Returns
  Message type currently set

## ◆ getModeEx()

template<typename ARGO_PROTOCOL_T >

argoMode_t getModeEx | ( | void |  | ) | const

`-Ex` for backw. compat w/ `IRArgoAC`

Get the current operation mode setting.

Note
  This is a full specialization for `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

Returns
  The current operation mode.

Note
  This `getModeEx()` method has been introduced to be able to retain old implementation of `getMode()` for `IRArgoAc` which used uint8_t <ARGO_PROTOCOL_T>
  This is a full specialization for `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.

Returns
  The current operation mode.

Note
  This `getModeEx()` method has been introduced to be able to retain old implementation of `getMode()` for `IRArgoAc` which used uint8_t <ARGO_PROTOCOL_T>

## ◆ getNight()

template<typename T >

bool IRArgoACBase< T >::getNight | ( | void |  | ) | const

Get the status of Night mode. i.e. Sleep.

Returns
  true if on, false if off.

## ◆ getPower()

template<typename ARGO_PROTOCOL_T >

bool getPower | ( | void |  | ) | const

Get the power setting from the internal state.

Note
  This is a full specialization for `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

Returns
  A boolean indicating the power setting. <ARGO_PROTOCOL_T>

Note
  This is a full specialization for `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

Returns
  A boolean indicating the power setting. <ARGO_PROTOCOL_T>

## ◆ getRaw()

template<typename T >

uint8_t * IRArgoACBase< T >::getRaw | ( | void |  | ) |

Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.

Returns
  A PTR to the internal state.

## ◆ getRawByteLength() [1/2]

template<typename T >

uint16_t IRArgoACBase< T >::getRawByteLength

Get actual raw state byte length for the current state.

Returns
  Actual length of state (in bytes)

## ◆ getRawByteLength() [2/2]

template<typename ARGO_PROTOCOL_T >

static uint16_t IRArgoACBase< ARGO_PROTOCOL_T >::getRawByteLength | ( | const ARGO_PROTOCOL_T & | raw,
|  | argoIrMessageType_t | messageTypeHint = `argoIrMessageType_t::AC_CONTROL`
| ) |  |
| static protected

## ◆ getSensorTemp()

template<typename T >

uint8_t IRArgoACBase< T >::getSensorTemp | ( | void |  | ) | const

Get the currently stored value for the room temperature setting.

Note
  Depending on message type - this will get `sensor` or `roomTemp` value

Returns
  The current setting for the room temp. in degrees celsius.

## ◆ getStateLengthForIrMsgType()

template<typename ARGO_PROTOCOL_T >

uint16_t getStateLengthForIrMsgType | ( | argoIrMessageType_t | type | ) |
| static

Get byte length of raw WREM-3 message based on IR cmd type.

Note
  This is a full specialization for `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

Parameters

  type | The type of IR command

Returns
  Byte length of state command <ARGO_PROTOCOL_T>

## ◆ getTemp()

template<typename T >

uint8_t IRArgoACBase< T >::getTemp | ( | void |  | ) | const

Get the current temperature setting.

Returns
  The current setting for temp. in degrees celsius.

## ◆ off()

template<typename T >

void IRArgoACBase< T >::off | ( | void |  | ) |

Set the internal state to have the power off.

## ◆ on()

template<typename T >

void IRArgoACBase< T >::on | ( | void |  | ) |

Set the internal state to have the power on.

## ◆ send()

template<typename T >

void IRArgoACBase< T >::send | ( | const uint16_t | repeat = `kArgoDefaultRepeat` | ) |

Send the current internal state as an IR message.

Parameters

  [in] | repeat | Nr. of times the message will be repeated.

## ◆ setFan()

template<typename ARGO_PROTOCOL_T >

void setFan | ( | const argoFan_t | fan | ) |

Set the desired fan mode (WREM3).

Note
  This is a full specialization for `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

Parameters

  [in] | fan | The desired fan speed. <ARGO_PROTOCOL_T>

## ◆ setFanEx()

template<typename ARGO_PROTOCOL_T >

void IRArgoACBase< ARGO_PROTOCOL_T >::setFanEx | ( | const argoFan_t | fan | ) |
| inline

## ◆ setFlap()

template<typename T >

void IRArgoACBase< T >::setFlap | ( | const argoFlap_t | flap | ) |

Set the desired flap mode.

Parameters

  [in] | flap | The desired flap mode.

## ◆ setFlapEx()

template<typename ARGO_PROTOCOL_T >

void IRArgoACBase< ARGO_PROTOCOL_T >::setFlapEx | ( | const argoFlap_t | flap | ) |
| inline

## ◆ setiFeel()

template<typename T >

void IRArgoACBase< T >::setiFeel | ( | const bool | on | ) |

Turn on/off the iFeel mode.

Parameters

  [in] | on | The desired setting.

## ◆ setMax()

template<typename T >

void IRArgoACBase< T >::setMax | ( | const bool | on | ) |

Control the current Max setting. (i.e. Turbo)

Parameters

  [in] | on | The desired setting.

## ◆ setMessageType()

template<typename T >

void IRArgoACBase< T >::setMessageType | ( | const argoIrMessageType_t | msgType | ) |

Set the message type of the next command (setting this resets state)

Parameters

  msgType | The message type to set

## ◆ setMode()

template<typename ARGO_PROTOCOL_T >

void setMode | ( | const argoMode_t | mode | ) |

Set the desired operation mode.

Note
  This is a full specialization for `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

Parameters

  [in] | mode | The desired operation mode. <ARGO_PROTOCOL_T>

## ◆ setModeEx()

template<typename ARGO_PROTOCOL_T >

void IRArgoACBase< ARGO_PROTOCOL_T >::setModeEx | ( | const argoMode_t | mode | ) |
| inline

## ◆ setNight()

template<typename T >

void IRArgoACBase< T >::setNight | ( | const bool | on | ) |

Turn on/off the Night mode. i.e. Sleep.

Parameters

  [in] | on | The desired setting.

## ◆ setPower()

template<typename ARGO_PROTOCOL_T >

void setPower | ( | const bool | on | ) |

Set the internal state to have the desired power.

Note
  This is a full specialization for `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

Parameters

  [in] | on | The desired power state. <ARGO_PROTOCOL_T>

## ◆ setRaw()

template<typename T >

void IRArgoACBase< T >::setRaw | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |

Set the raw state of the object.

Parameters

  [in] | state | The raw state from the native IR message.
  [in] | length | The length of raw state in bytes.

## ◆ setSensorTemp()

template<typename T >

void IRArgoACBase< T >::setSensorTemp | ( | const uint8_t | degrees | ) |

Set the value for the current room temperature.

Note
  Depending on message type - this will set `sensor` or `roomTemp` value

Parameters

  [in] | degrees | The temperature in degrees celsius.

## ◆ setTemp()

template<typename T >

void IRArgoACBase< T >::setTemp | ( | const uint8_t | degrees | ) |

Set the temperature.

Parameters

  [in] | degrees | The temperature in degrees celsius.

Note
  Sending 0 equals +4

## ◆ stateReset()

template<typename T >

void IRArgoACBase< T >::stateReset | ( | argoIrMessageType_t | messageType = `argoIrMessageType_t::AC_CONTROL` | ) |
| protected

Reset the internals of the object to a known good state.

Parameters

  messageType | Type of message to reset the state for

## ◆ toCommonCommand()

template<typename T >

stdAc::ac_command_t IRArgoACBase< T >::toCommonCommand | ( | const argoIrMessageType_t | command | ) |
| static protected

Convert a native message type into its stdAc equivalent.

Parameters

  [in] | command | The native setting to be converted.

Returns
  The stdAc equivalent of the native setting.

## ◆ toCommonFanSpeed()

template<typename T >

stdAc::fanspeed_t IRArgoACBase< T >::toCommonFanSpeed | ( | const argoFan_t | speed | ) |
| static protected

Convert a native fan speed into its stdAc equivalent.

Parameters

  [in] | speed | The native setting to be converted.

Returns
  The stdAc equivalent of the native setting.

## ◆ toCommonMode()

template<typename T >

stdAc::opmode_t IRArgoACBase< T >::toCommonMode | ( | const argoMode_t | mode | ) |
| static protected

Convert a native mode into its stdAc equivalent.

Parameters

  [in] | mode | The native setting to be converted.

Returns
  The stdAc equivalent of the native setting.

## ◆ toCommonSwingV()

template<typename ARGO_PROTOCOL_T >

stdAc::swingv_t toCommonSwingV | ( | const uint8_t | position | ) |
| static protected

Convert a native flap mode into its stdAc equivalent (WREM3).

Note
  This is a full specialization for `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

Parameters

  [in] | position | The native setting to be converted.

Returns
  The stdAc equivalent of the native setting. <ARGO_PROTOCOL_T>

## ◆ validChecksum()

template<typename T >

bool IRArgoACBase< T >::validChecksum | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |
| static

Verify the checksum is valid for a given state.

Parameters

  [in] | state | The array to verify the checksum of.
  [in] | length | The size of the state.

Returns
  A boolean indicating if it's checksum is valid.

## Friends And Related Function Documentation

## ◆ _checksum() [1/2]

void _checksum | ( | ArgoProtocol * | state | ) |
| related

Update the checksum for a given state (WREM2).

Note
  This is a full specialization for `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

Warning
  This impl does not support short message format (iFeel)

Parameters

  [in,out] | state | Pointer to a binary representation of the A/C state. <ARGO_PROTOCOL_T>

## ◆ _checksum() [2/2]

void _checksum | ( | ArgoProtocolWREM3 * | state | ) |
| related

Update the checksum for a given state (WREM3).

Note
  This is a full specialization for `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

Parameters

  [in,out] | state | Pointer to a binary representation of the A/C state. <ARGO_PROTOCOL_T>

## ◆ _stateReset() [1/2]

void _stateReset | ( | ArgoProtocol * | state,
|  | argoIrMessageType_t |
| ) |  |
| related

Reset the given state to a known good state.

Note
  This is a full specialization for `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

Parameters

  [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>

## ◆ _stateReset() [2/2]

void _stateReset | ( | ArgoProtocolWREM3 * | state,
|  | argoIrMessageType_t | messageType
| ) |  |
| related

Reset the given state to a known good state.

Note
  This is a full specialization for `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

Parameters

  [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>

## ◆ getRawByteLength() [1/2]

uint16_t getRawByteLength | ( | const ArgoProtocol & | ,
|  | argoIrMessageType_t | messageType
| ) |  |
| related

Get actual raw state byte length for the current state _param 1st param ignored: WREM-2 does not caryy type in payload, allegedly.

Parameters

  messageType | Type of message the state is carrying

Returns
  Actual length of state (in bytes)

Note
  This is a full specialization for `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>

## ◆ getRawByteLength() [2/2]

uint16_t getRawByteLength | ( | const ArgoProtocolWREM3 & | raw,
|  | argoIrMessageType_t |
| ) |  |
| related

Get actual raw state byte length for the current state.

Parameters

  raw | The raw state _param 2nd param ignored (1st byte of `raw` is sufficient to get len)

Returns
  Actual length of state (in bytes)

Note
  This is a full specialization for `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>

## Member Data Documentation

## ◆ _

template<typename ARGO_PROTOCOL_T >

ARGO_PROTOCOL_T IRArgoACBase< ARGO_PROTOCOL_T >::_
| protected

The raw protocol data.

## ◆ _irsend

template<typename ARGO_PROTOCOL_T >

IRsend IRArgoACBase< ARGO_PROTOCOL_T >::_irsend
| protected

instance of the IR send class

## ◆ _length

template<typename ARGO_PROTOCOL_T >

uint16_t IRArgoACBase< ARGO_PROTOCOL_T >::_length = kArgoStateLength
| protected

## ◆ _messageType

template<typename ARGO_PROTOCOL_T >

argoIrMessageType_t IRArgoACBase< ARGO_PROTOCOL_T >::_messageType = argoIrMessageType_t::AC_CONTROL
| protected

The documentation for this class was generated from the following files:

- src/ir_Argo.h
- src/ir_Argo.cpp