Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
ESPWifiClient::BufferTimer Class Reference

Timer that triggers the parent flow when expiring. More...

Inheritance diagram for ESPWifiClient::BufferTimer:
Timer Executable Notifiable QMember Destructable

Public Member Functions

 BufferTimer (ESPWifiClient *parent)
 Constructor.
 
long long timeout () override
 callback when the timer expires.
 
- Public Member Functions inherited from Timer
 Timer (ActiveTimers *timers)
 Constructor.
 
 ~Timer ()
 Destructor.
 
void run () override
 Callback from the executor when this timer is scheduled.
 
long long schedule_time ()
 
void start (long long period=-1)
 Starts a timer.
 
void start_absolute (long long expiry_time_nsec)
 Starts the timer with an absolute deadline.
 
void restart ()
 Restart a timer with the existing period but from the current time.
 
void trigger ()
 This will wakeup the timer prematurely, immediately.
 
void ensure_triggered ()
 Triggers the timer if it is not expired yet.
 
void cancel ()
 Dangerous, do not call.
 
bool is_triggered ()
 
void set_triggered ()
 Sets the timer as if it was woken up by a trigger(), even if it was never started.
 
- Public Member Functions inherited from Executable
void test_deletion ()
 
void notify () override
 Crashes the program – everyone who is expecting notify calls must override this function.
 
virtual void alloc_result (QMember *item)
 Return the result of an alloc_async() from a memory Pool.
 
- Public Member Functions inherited from QMember
void init ()
 Initiailize a QMember, in place of a public placement construction.
 

Private Attributes

ESPWifiClientparent_
 parent who owns *this.
 

Additional Inherited Members

- Public Types inherited from Timer
enum  { NONE = 0 , RESTART = 1 , DELETE = -1 }
 Special return values from the timeout function. More...
 
- Protected Member Functions inherited from Timer
void update_period (long long period)
 Updates the period, to be used after the next expiration of the timer in order to restart it.
 
- Protected Member Functions inherited from QMember
 QMember ()
 Constructor.
 
 ~QMember ()
 Destructor.
 
- Protected Attributes inherited from QMember
QMembernext
 pointer to the next member in the queue
 

Detailed Description

Timer that triggers the parent flow when expiring.

Used to flush the accumulated gridconnect bytes to the TCP socket.

Definition at line 339 of file ESPWifiClient.hxx.

Constructor & Destructor Documentation

◆ BufferTimer()

ESPWifiClient::BufferTimer::BufferTimer ( ESPWifiClient parent)
inline

Constructor.

Parameters
parentwho owns *this.

Definition at line 343 of file ESPWifiClient.hxx.

Member Function Documentation

◆ timeout()

long long ESPWifiClient::BufferTimer::timeout ( )
inlineoverridevirtual

callback when the timer expires.

Returns
do not restart timer.

Implements Timer.

Definition at line 350 of file ESPWifiClient.hxx.

Member Data Documentation

◆ parent_

ESPWifiClient* ESPWifiClient::BufferTimer::parent_
private

parent who owns *this.

Definition at line 356 of file ESPWifiClient.hxx.


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