ESPHome  2024.3.1
Public Member Functions | Protected Attributes
esphome::nfc::NdefRecordText Class Reference

#include <ndef_record_text.h>

Inheritance diagram for esphome::nfc::NdefRecordText:
esphome::nfc::NdefRecord

Public Member Functions

 NdefRecordText ()
 
 NdefRecordText (const std::vector< uint8_t > &payload)
 
 NdefRecordText (const std::string &language_code, const std::string &text)
 
 NdefRecordText (const std::string &language_code, const std::string &text, const std::string &id)
 
 NdefRecordText (const NdefRecordText &)=default
 
std::unique_ptr< NdefRecordclone () const override
 
std::vector< uint8_t > get_encoded_payload () override
 
const std::string & get_payload () const override
 
- Public Member Functions inherited from esphome::nfc::NdefRecord
 NdefRecord ()
 
 NdefRecord (std::vector< uint8_t > payload_data)
 
void set_tnf (uint8_t tnf)
 
void set_type (const std::string &type)
 
void set_payload (const std::string &payload)
 
void set_id (const std::string &id)
 
 NdefRecord (const NdefRecord &)=default
 
virtual ~NdefRecord ()
 
uint32_t get_encoded_size ()
 
std::vector< uint8_t > encode (bool first, bool last)
 
uint8_t create_flag_byte (bool first, bool last, size_t payload_size)
 
const std::string & get_type () const
 
const std::string & get_id () const
 

Protected Attributes

std::string text_
 
std::string language_code_
 
- Protected Attributes inherited from esphome::nfc::NdefRecord
uint8_t tnf_
 
std::string type_
 
std::string id_
 
std::string payload_
 

Detailed Description

Definition at line 12 of file ndef_record_text.h.

Constructor & Destructor Documentation

◆ NdefRecordText() [1/5]

esphome::nfc::NdefRecordText::NdefRecordText ( )
inline

Definition at line 14 of file ndef_record_text.h.

◆ NdefRecordText() [2/5]

esphome::nfc::NdefRecordText::NdefRecordText ( const std::vector< uint8_t > &  payload)

Definition at line 9 of file ndef_record_text.cpp.

◆ NdefRecordText() [3/5]

esphome::nfc::NdefRecordText::NdefRecordText ( const std::string &  language_code,
const std::string &  text 
)
inline

Definition at line 16 of file ndef_record_text.h.

◆ NdefRecordText() [4/5]

esphome::nfc::NdefRecordText::NdefRecordText ( const std::string &  language_code,
const std::string &  text,
const std::string &  id 
)
inline

Definition at line 22 of file ndef_record_text.h.

◆ NdefRecordText() [5/5]

esphome::nfc::NdefRecordText::NdefRecordText ( const NdefRecordText )
default

Member Function Documentation

◆ clone()

std::unique_ptr<NdefRecord> esphome::nfc::NdefRecordText::clone ( ) const
inlineoverridevirtual

Reimplemented from esphome::nfc::NdefRecord.

Definition at line 31 of file ndef_record_text.h.

◆ get_encoded_payload()

std::vector< uint8_t > esphome::nfc::NdefRecordText::get_encoded_payload ( )
overridevirtual

Reimplemented from esphome::nfc::NdefRecord.

Definition at line 26 of file ndef_record_text.cpp.

◆ get_payload()

const std::string& esphome::nfc::NdefRecordText::get_payload ( ) const
inlineoverridevirtual

Reimplemented from esphome::nfc::NdefRecord.

Definition at line 35 of file ndef_record_text.h.

Field Documentation

◆ language_code_

std::string esphome::nfc::NdefRecordText::language_code_
protected

Definition at line 39 of file ndef_record_text.h.

◆ text_

std::string esphome::nfc::NdefRecordText::text_
protected

Definition at line 35 of file ndef_record_text.h.


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