ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::remote_base::RemoteTransmitterBase Class Referenceabstract

#include <remote_base.h>

Inheritance diagram for esphome::remote_base::RemoteTransmitterBase:
esphome::remote_base::RemoteComponentBase esphome::remote_transmitter::RemoteTransmitterComponent

Data Structures

class  EncodeCall
 A transmit call whose encode() runs one of Protocol's encoders on its data, for a payload the protocol encodes straight from a pointer and length; the call a generated action builds. More...
 
class  ProtocolCall
 Protocol data filled field by field, then sent by perform(); the call a generated transmit action builds. More...
 
class  TransmitCall
 

Public Member Functions

 RemoteTransmitterBase (InternalGPIOPin *pin)
 
TransmitCall transmit ()
 
template<RemoteProtocolEncoder Protocol>
void transmit (const typename Protocol::ProtocolData &data, uint32_t send_times=1, uint32_t send_wait=0)
 
template<RemoteProtocolEncoder Protocol>
ProtocolCall< Protocol > protocol_call ()
 
template<RemoteProtocolEncoder Protocol>
EncodeCall< Protocol > encode_call ()
 
- Public Member Functions inherited from esphome::remote_base::RemoteComponentBase
 RemoteComponentBase (InternalGPIOPin *pin)
 

Protected Types

using EncodeFn = void (*)(RemoteTransmitData *dst, const void *data)
 

Protected Member Functions

void transmit_encoded_ (EncodeFn encode, const void *data, uint32_t send_times, uint32_t send_wait)
 
void send_ (uint32_t send_times, uint32_t send_wait, uint16_t seq)
 
virtual void send_internal (uint32_t send_times, uint32_t send_wait)=0
 
virtual void flush_pending_completion ()
 Platforms that report completion later wait out the previous frame here, before send_() assigns the next seq, so that completion carries the seq it belongs to.
 
void send_single_ ()
 
void notify_complete_ (bool sent)
 Reports the frame handed to the platform last, after its final repeat and before the on_complete trigger; a seq only has to be unique within the 30 s reply window.
 
uint16_t take_seq_ ()
 
void notify_complete_ (bool)
 

Static Protected Member Functions

template<RemoteProtocolEncoder Protocol>
static void encode_thunk (RemoteTransmitData *dst, const void *data)
 
static uint16_t take_seq_ ()
 

Protected Attributes

uint16_t next_seq_ {0}
 
uint16_t current_seq_ {0}
 
RemoteTransmitData temp_
 Use same vector for all transmits, avoids many allocations.
 
- Protected Attributes inherited from esphome::remote_base::RemoteComponentBase
InternalGPIOPin * pin_
 

Detailed Description

Definition at line 241 of file remote_base.h.

Member Typedef Documentation

◆ EncodeFn

using esphome::remote_base::RemoteTransmitterBase::EncodeFn = void (*)(RemoteTransmitData *dst, const void *data)
protected

Definition at line 296 of file remote_base.h.

Constructor & Destructor Documentation

◆ RemoteTransmitterBase()

esphome::remote_base::RemoteTransmitterBase::RemoteTransmitterBase ( InternalGPIOPin * pin)
inline

Definition at line 243 of file remote_base.h.

Member Function Documentation

◆ encode_call()

template<RemoteProtocolEncoder Protocol>
EncodeCall< Protocol > esphome::remote_base::RemoteTransmitterBase::encode_call ( )
inline

Definition at line 291 of file remote_base.h.

◆ encode_thunk()

template<RemoteProtocolEncoder Protocol>
static void esphome::remote_base::RemoteTransmitterBase::encode_thunk ( RemoteTransmitData * dst,
const void * data )
inlinestaticprotected

Definition at line 299 of file remote_base.h.

◆ flush_pending_completion()

virtual void esphome::remote_base::RemoteTransmitterBase::flush_pending_completion ( )
inlineprotectedvirtual

Platforms that report completion later wait out the previous frame here, before send_() assigns the next seq, so that completion carries the seq it belongs to.

Reimplemented in esphome::remote_transmitter::RemoteTransmitterComponent.

Definition at line 306 of file remote_base.h.

◆ notify_complete_() [1/2]

void esphome::remote_base::RemoteTransmitterBase::notify_complete_ ( bool sent)
inlineprotected

Reports the frame handed to the platform last, after its final repeat and before the on_complete trigger; a seq only has to be unique within the 30 s reply window.

Definition at line 311 of file remote_base.h.

◆ notify_complete_() [2/2]

void esphome::remote_base::RemoteTransmitterBase::notify_complete_ ( bool )
inlineprotected

Definition at line 318 of file remote_base.h.

◆ protocol_call()

template<RemoteProtocolEncoder Protocol>
ProtocolCall< Protocol > esphome::remote_base::RemoteTransmitterBase::protocol_call ( )
inline

Definition at line 281 of file remote_base.h.

◆ send_()

void esphome::remote_base::RemoteTransmitterBase::send_ ( uint32_t send_times,
uint32_t send_wait,
uint16_t seq )
protected

Definition at line 199 of file remote_base.cpp.

◆ send_internal()

virtual void esphome::remote_base::RemoteTransmitterBase::send_internal ( uint32_t send_times,
uint32_t send_wait )
protectedpure virtual

◆ send_single_()

void esphome::remote_base::RemoteTransmitterBase::send_single_ ( )
inlineprotected

Definition at line 307 of file remote_base.h.

◆ take_seq_() [1/2]

uint16_t esphome::remote_base::RemoteTransmitterBase::take_seq_ ( )
inlineprotected

Definition at line 312 of file remote_base.h.

◆ take_seq_() [2/2]

static uint16_t esphome::remote_base::RemoteTransmitterBase::take_seq_ ( )
inlinestaticprotected

Definition at line 319 of file remote_base.h.

◆ transmit() [1/2]

RemoteTransmitterBase::TransmitCall esphome::remote_base::RemoteTransmitterBase::transmit ( )

Definition at line 185 of file remote_base.cpp.

◆ transmit() [2/2]

template<RemoteProtocolEncoder Protocol>
void esphome::remote_base::RemoteTransmitterBase::transmit ( const typename Protocol::ProtocolData & data,
uint32_t send_times = 1,
uint32_t send_wait = 0 )
inline

Definition at line 263 of file remote_base.h.

◆ transmit_encoded_()

void esphome::remote_base::RemoteTransmitterBase::transmit_encoded_ ( EncodeFn encode,
const void * data,
uint32_t send_times,
uint32_t send_wait )
protected

Definition at line 190 of file remote_base.cpp.

Field Documentation

◆ current_seq_

uint16_t esphome::remote_base::RemoteTransmitterBase::current_seq_ {0}
protected

Definition at line 315 of file remote_base.h.

◆ next_seq_

uint16_t esphome::remote_base::RemoteTransmitterBase::next_seq_ {0}
protected

Definition at line 314 of file remote_base.h.

◆ temp_

RemoteTransmitData esphome::remote_base::RemoteTransmitterBase::temp_
protected

Use same vector for all transmits, avoids many allocations.

Definition at line 323 of file remote_base.h.


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