ESPHome  2021.11.3
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
esphome::remote_base::MideaData Class Reference

#include <midea_protocol.h>

Inheritance diagram for esphome::remote_base::MideaData:
esphome::midea::IrFollowMeData esphome::midea::IrSpecialData

Public Types

enum  MideaDataType : uint8_t { MIDEA_TYPE_COMMAND = 0xA1, MIDEA_TYPE_SPECIAL = 0xA2, MIDEA_TYPE_FOLLOW_ME = 0xA4 }
 

Public Member Functions

 MideaData ()
 
 MideaData (std::initializer_list< uint8_t > data)
 
 MideaData (const std::vector< uint8_t > &data)
 
 MideaData (const MideaData &)=default
 
uint8_t * data ()
 
const uint8_t * data () const
 
uint8_t size () const
 
bool is_valid () const
 
void finalize ()
 
bool check_compliment (const MideaData &rhs) const
 
std::string to_string () const
 
bool operator== (const MideaData &rhs) const
 
MideaDataType type () const
 
template<typename T >
to () const
 

Protected Member Functions

void set_value_ (uint8_t offset, uint8_t val_mask, uint8_t shift, uint8_t val)
 
uint8_t calc_cs_ () const
 

Protected Attributes

uint8_t data_ [6]
 

Static Protected Attributes

static const uint8_t OFFSET_CS = 5
 

Detailed Description

Definition at line 10 of file midea_protocol.h.

Member Enumeration Documentation

◆ MideaDataType

Enumerator
MIDEA_TYPE_COMMAND 
MIDEA_TYPE_SPECIAL 
MIDEA_TYPE_FOLLOW_ME 

Definition at line 32 of file midea_protocol.h.

Constructor & Destructor Documentation

◆ MideaData() [1/4]

esphome::remote_base::MideaData::MideaData ( )
inline

Definition at line 13 of file midea_protocol.h.

◆ MideaData() [2/4]

esphome::remote_base::MideaData::MideaData ( std::initializer_list< uint8_t >  data)
inline

Definition at line 15 of file midea_protocol.h.

◆ MideaData() [3/4]

esphome::remote_base::MideaData::MideaData ( const std::vector< uint8_t > &  data)
inline

Definition at line 17 of file midea_protocol.h.

◆ MideaData() [4/4]

esphome::remote_base::MideaData::MideaData ( const MideaData )
default

Member Function Documentation

◆ calc_cs_()

uint8_t esphome::remote_base::MideaData::calc_cs_ ( ) const
protected

Definition at line 9 of file midea_protocol.cpp.

◆ check_compliment()

bool esphome::remote_base::MideaData::check_compliment ( const MideaData rhs) const

Definition at line 16 of file midea_protocol.cpp.

◆ data() [1/2]

uint8_t* esphome::remote_base::MideaData::data ( )
inline

Definition at line 23 of file midea_protocol.h.

◆ data() [2/2]

const uint8_t* esphome::remote_base::MideaData::data ( ) const
inline

Definition at line 24 of file midea_protocol.h.

◆ finalize()

void esphome::remote_base::MideaData::finalize ( )
inline

Definition at line 27 of file midea_protocol.h.

◆ is_valid()

bool esphome::remote_base::MideaData::is_valid ( ) const
inline

Definition at line 26 of file midea_protocol.h.

◆ operator==()

bool esphome::remote_base::MideaData::operator== ( const MideaData rhs) const
inline

Definition at line 31 of file midea_protocol.h.

◆ set_value_()

void esphome::remote_base::MideaData::set_value_ ( uint8_t  offset,
uint8_t  val_mask,
uint8_t  shift,
uint8_t  val 
)
inlineprotected

Definition at line 41 of file midea_protocol.h.

◆ size()

uint8_t esphome::remote_base::MideaData::size ( ) const
inline

Definition at line 25 of file midea_protocol.h.

◆ to()

template<typename T >
T esphome::remote_base::MideaData::to ( ) const
inline

Definition at line 38 of file midea_protocol.h.

◆ to_string()

std::string esphome::remote_base::MideaData::to_string ( ) const
inline

Definition at line 29 of file midea_protocol.h.

◆ type()

MideaDataType esphome::remote_base::MideaData::type ( ) const
inline

Definition at line 37 of file midea_protocol.h.

Field Documentation

◆ data_

uint8_t esphome::remote_base::MideaData::data_[6]
protected

Definition at line 47 of file midea_protocol.h.

◆ OFFSET_CS

const uint8_t esphome::remote_base::MideaData::OFFSET_CS = 5
staticprotected

Definition at line 45 of file midea_protocol.h.


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