ESPHome  2024.11.0
Public Member Functions | Protected Attributes
esphome::nfc::NciMessage Class Reference

#include <nci_message.h>

Public Member Functions

 NciMessage ()
 
 NciMessage (uint8_t message_type, const std::vector< uint8_t > &payload)
 
 NciMessage (uint8_t message_type, uint8_t gid, uint8_t oid)
 
 NciMessage (uint8_t message_type, uint8_t gid, uint8_t oid, const std::vector< uint8_t > &payload)
 
 NciMessage (const std::vector< uint8_t > &raw_packet)
 
std::vector< uint8_t > encode ()
 
void reset ()
 
uint8_t get_message_type () const
 
uint8_t get_gid () const
 
uint8_t get_oid () const
 
uint8_t get_payload_size (bool recompute=false)
 
uint8_t get_simple_status_response () const
 
uint8_t get_message_byte (uint8_t offset) const
 
std::vector< uint8_t > & get_message ()
 
bool has_payload () const
 
bool message_type_is (uint8_t message_type) const
 
bool message_length_is (uint8_t message_length, bool recompute=false)
 
bool gid_is (uint8_t gid) const
 
bool oid_is (uint8_t oid) const
 
bool simple_status_response_is (uint8_t response) const
 
void set_header (uint8_t message_type, uint8_t gid, uint8_t oid)
 
void set_message (uint8_t message_type, const std::vector< uint8_t > &payload)
 
void set_message (uint8_t message_type, uint8_t gid, uint8_t oid, const std::vector< uint8_t > &payload)
 
void set_message_type (uint8_t message_type)
 
void set_gid (uint8_t gid)
 
void set_oid (uint8_t oid)
 
void set_payload (const std::vector< uint8_t > &payload)
 

Protected Attributes

std::vector< uint8_t > nci_message_ {0, 0, 0}
 

Detailed Description

Definition at line 11 of file nci_message.h.

Constructor & Destructor Documentation

◆ NciMessage() [1/5]

esphome::nfc::NciMessage::NciMessage ( )
inline

Definition at line 13 of file nci_message.h.

◆ NciMessage() [2/5]

esphome::nfc::NciMessage::NciMessage ( uint8_t  message_type,
const std::vector< uint8_t > &  payload 
)

Definition at line 12 of file nci_message.cpp.

◆ NciMessage() [3/5]

esphome::nfc::NciMessage::NciMessage ( uint8_t  message_type,
uint8_t  gid,
uint8_t  oid 
)

Definition at line 16 of file nci_message.cpp.

◆ NciMessage() [4/5]

esphome::nfc::NciMessage::NciMessage ( uint8_t  message_type,
uint8_t  gid,
uint8_t  oid,
const std::vector< uint8_t > &  payload 
)

Definition at line 20 of file nci_message.cpp.

◆ NciMessage() [5/5]

esphome::nfc::NciMessage::NciMessage ( const std::vector< uint8_t > &  raw_packet)

Definition at line 25 of file nci_message.cpp.

Member Function Documentation

◆ encode()

std::vector< uint8_t > esphome::nfc::NciMessage::encode ( )

Definition at line 27 of file nci_message.cpp.

◆ get_gid()

uint8_t esphome::nfc::NciMessage::get_gid ( ) const

Definition at line 39 of file nci_message.cpp.

◆ get_message()

std::vector< uint8_t > & esphome::nfc::NciMessage::get_message ( )

Definition at line 67 of file nci_message.cpp.

◆ get_message_byte()

uint8_t esphome::nfc::NciMessage::get_message_byte ( uint8_t  offset) const

Definition at line 60 of file nci_message.cpp.

◆ get_message_type()

uint8_t esphome::nfc::NciMessage::get_message_type ( ) const

Definition at line 35 of file nci_message.cpp.

◆ get_oid()

uint8_t esphome::nfc::NciMessage::get_oid ( ) const

Definition at line 41 of file nci_message.cpp.

◆ get_payload_size()

uint8_t esphome::nfc::NciMessage::get_payload_size ( bool  recompute = false)

Definition at line 43 of file nci_message.cpp.

◆ get_simple_status_response()

uint8_t esphome::nfc::NciMessage::get_simple_status_response ( ) const

Definition at line 53 of file nci_message.cpp.

◆ gid_is()

bool esphome::nfc::NciMessage::gid_is ( uint8_t  gid) const

Definition at line 88 of file nci_message.cpp.

◆ has_payload()

bool esphome::nfc::NciMessage::has_payload ( ) const

Definition at line 69 of file nci_message.cpp.

◆ message_length_is()

bool esphome::nfc::NciMessage::message_length_is ( uint8_t  message_length,
bool  recompute = false 
)

Definition at line 78 of file nci_message.cpp.

◆ message_type_is()

bool esphome::nfc::NciMessage::message_type_is ( uint8_t  message_type) const

Definition at line 71 of file nci_message.cpp.

◆ oid_is()

bool esphome::nfc::NciMessage::oid_is ( uint8_t  oid) const

Definition at line 95 of file nci_message.cpp.

◆ reset()

void esphome::nfc::NciMessage::reset ( )

Definition at line 33 of file nci_message.cpp.

◆ set_gid()

void esphome::nfc::NciMessage::set_gid ( uint8_t  gid)

Definition at line 142 of file nci_message.cpp.

◆ set_header()

void esphome::nfc::NciMessage::set_header ( uint8_t  message_type,
uint8_t  gid,
uint8_t  oid 
)

Definition at line 109 of file nci_message.cpp.

◆ set_message() [1/2]

void esphome::nfc::NciMessage::set_message ( uint8_t  message_type,
const std::vector< uint8_t > &  payload 
)

Definition at line 118 of file nci_message.cpp.

◆ set_message() [2/2]

void esphome::nfc::NciMessage::set_message ( uint8_t  message_type,
uint8_t  gid,
uint8_t  oid,
const std::vector< uint8_t > &  payload 
)

Definition at line 124 of file nci_message.cpp.

◆ set_message_type()

void esphome::nfc::NciMessage::set_message_type ( uint8_t  message_type)

Definition at line 134 of file nci_message.cpp.

◆ set_oid()

void esphome::nfc::NciMessage::set_oid ( uint8_t  oid)

Definition at line 150 of file nci_message.cpp.

◆ set_payload()

void esphome::nfc::NciMessage::set_payload ( const std::vector< uint8_t > &  payload)

Definition at line 157 of file nci_message.cpp.

◆ simple_status_response_is()

bool esphome::nfc::NciMessage::simple_status_response_is ( uint8_t  response) const

Definition at line 102 of file nci_message.cpp.

Field Documentation

◆ nci_message_

std::vector<uint8_t> esphome::nfc::NciMessage::nci_message_ {0, 0, 0}
protected

Definition at line 46 of file nci_message.h.


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