IRremoteESP8266
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
IRBosch144AC Class Reference

Class for handling detailed Bosch144 A/C messages. More...

#include <ir_Bosch.h>

Collaboration diagram for IRBosch144AC:
Collaboration graph
[legend]

Public Member Functions

 IRBosch144AC (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor. More...
 
void stateReset (void)
 Reset the internal state to a fixed known good state. More...
 
void send (const uint16_t repeat=0)
 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 ()
 Set up hardware to be able to send a message. More...
 
void setPower (const bool state)
 
bool getPower (void) const
 
void setTemp (const uint8_t temp)
 Set the temperature. More...
 
uint8_t getTemp (void) const
 
void setFan (const uint16_t speed)
 Set the speed of the fan. More...
 
uint16_t getFan (void) const
 
void setMode (const uint8_t mode)
 Set the desired operation mode. More...
 
uint8_t getMode (void) const
 
void setQuiet (const bool on)
 Set the Quiet mode of the A/C. More...
 
bool getQuiet (void) const
 Get the Quiet mode of the A/C. More...
 
uint8_t * getRaw (void)
 Get a copy of the internal state as a valid code for this protocol. More...
 
void setRaw (const uint8_t new_code[], const uint16_t length=kBosch144StateLength)
 Set the internal state from a valid code for this protocol. More...
 
stdAc::state_t toCommon (void) const
 Convert the current internal state into its stdAc::state_t equivalent. More...
 
String toString (void) const
 Convert the current internal state into a human readable string. More...
 

Static Public Member Functions

static uint8_t convertMode (const stdAc::opmode_t mode)
 Convert a stdAc::opmode_t enum into its native mode. More...
 
static uint16_t convertFan (const stdAc::fanspeed_t speed)
 Convert a stdAc::fanspeed_t enum into it's native speed. More...
 
static stdAc::opmode_t toCommonMode (const uint8_t mode)
 Convert a native mode into its stdAc equivalent. More...
 
static stdAc::fanspeed_t toCommonFanSpeed (const uint16_t speed)
 Convert a native fan speed into its stdAc equivalent. More...
 

Private Member Functions

void setInvertBytes ()
 
void setCheckSumS3 ()
 
void setTempRaw (const uint8_t code)
 
uint8_t getTempRaw (void) const
 

Private Attributes

IRsend _irsend
 Instance of the IR send class. More...
 
Bosch144Protocol _
 The state of the IR remote in IR code form. More...
 
bool powerFlag
 

Detailed Description

Class for handling detailed Bosch144 A/C messages.

Constructor & Destructor Documentation

◆ IRBosch144AC()

IRBosch144AC::IRBosch144AC ( const uint16_t  pin,
const bool  inverted = false,
const bool  use_modulation = true 
)
explicit

Class constructor.

Parameters
[in]pinGPIO to be used when sending.
[in]invertedIs the output signal to be inverted?
[in]use_modulationIs frequency modulation to be used?

Member Function Documentation

◆ begin()

void IRBosch144AC::begin ( )

Set up hardware to be able to send a message.

◆ calibrate()

int8_t IRBosch144AC::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.

◆ convertFan()

uint16_t IRBosch144AC::convertFan ( const stdAc::fanspeed_t  speed)
static

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

Parameters
[in]speedThe enum to be converted.
Returns
The native equivalent of the enum.

◆ convertMode()

uint8_t IRBosch144AC::convertMode ( const stdAc::opmode_t  mode)
static

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

Parameters
[in]modeThe enum to be converted.
Returns
The native equivalent of the enum.

◆ getFan()

uint16_t IRBosch144AC::getFan ( void  ) const

◆ getMode()

uint8_t IRBosch144AC::getMode ( void  ) const

◆ getPower()

bool IRBosch144AC::getPower ( void  ) const

◆ getQuiet()

bool IRBosch144AC::getQuiet ( void  ) const

Get the Quiet mode of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getRaw()

unsigned char * IRBosch144AC::getRaw ( void  )

Get a copy of the internal state as a valid code for this protocol.

Returns
A valid code for this protocol based on the current internal state.

◆ getTemp()

uint8_t IRBosch144AC::getTemp ( void  ) const

◆ getTempRaw()

uint8_t IRBosch144AC::getTempRaw ( void  ) const
private

◆ send()

void IRBosch144AC::send ( const uint16_t  repeat = 0)

Send the current internal state as an IR message.

Parameters
[in]repeatNr. of times the message will be repeated.

◆ setCheckSumS3()

void IRBosch144AC::setCheckSumS3 ( )
private

◆ setFan()

void IRBosch144AC::setFan ( const uint16_t  speed)

Set the speed of the fan.

Parameters
[in]speedThe desired setting.

◆ setInvertBytes()

void IRBosch144AC::setInvertBytes ( )
private

◆ setMode()

void IRBosch144AC::setMode ( const uint8_t  mode)

Set the desired operation mode.

Parameters
[in]modeThe desired operation mode.

◆ setPower()

void IRBosch144AC::setPower ( const bool  state)

◆ setQuiet()

void IRBosch144AC::setQuiet ( const bool  on)

Set the Quiet mode of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setRaw()

void IRBosch144AC::setRaw ( const uint8_t  new_code[],
const uint16_t  length = kBosch144StateLength 
)

Set the internal state from a valid code for this protocol.

Parameters
[in]new_codeA valid code for this protocol.
[in]lengthSize of the array being passed in in bytes.

◆ setTemp()

void IRBosch144AC::setTemp ( const uint8_t  degrees)

Set the temperature.

Parameters
[in]degreesThe temperature in degrees celsius.

◆ setTempRaw()

void IRBosch144AC::setTempRaw ( const uint8_t  code)
private

◆ stateReset()

void IRBosch144AC::stateReset ( void  )

Reset the internal state to a fixed known good state.

◆ toCommon()

stdAc::state_t IRBosch144AC::toCommon ( void  ) const

Convert the current internal state into its stdAc::state_t equivalent.

Returns
The stdAc equivalent of the native settings.

◆ toCommonFanSpeed()

stdAc::fanspeed_t IRBosch144AC::toCommonFanSpeed ( const uint16_t  speed)
static

Convert a native fan speed into its stdAc equivalent.

Parameters
[in]speedThe native setting to be converted.
Returns
The stdAc equivalent of the native setting.

◆ toCommonMode()

stdAc::opmode_t IRBosch144AC::toCommonMode ( const uint8_t  mode)
static

Convert a native mode into its stdAc equivalent.

Parameters
[in]modeThe native setting to be converted.
Returns
The stdAc equivalent of the native setting.

◆ toString()

String IRBosch144AC::toString ( void  ) const

Convert the current internal state into a human readable string.

Returns
A human readable string.

Member Data Documentation

◆ _

Bosch144Protocol IRBosch144AC::_
private

The state of the IR remote in IR code form.

◆ _irsend

IRsend IRBosch144AC::_irsend
private

Instance of the IR send class.

◆ powerFlag

bool IRBosch144AC::powerFlag
private

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