PosturePerfection
Public Member Functions | Data Fields
PostureEstimating::MessageTimer Class Reference

Broadcasts a message using RemoteNotify::Broadcast after a time is elapsed. More...

#include <posture_estimator.h>

Inheritance diagram for PostureEstimating::MessageTimer:
Inheritance graph
[legend]
Collaboration diagram for PostureEstimating::MessageTimer:
Collaboration graph
[legend]

Public Member Functions

 MessageTimer (std::vector< DelayTimer * > timers, RemoteNotify::Broadcast *broadcast, std::string msg, size_t time)
 Constructor for PostureEstimating::MessageTimer More...
 
 ~MessageTimer ()
 Deconstructor for PostureEstimating::MessageTimer More...
 
void countdown ()
 Starts timer to countdown, sending a messsage at the end of the countdown. More...
 
void stopCountdown ()
 Stops the countdown and doesn't send message. More...
 
void timerEvent ()
 

Data Fields

size_t time
 
bool running
 Boolen which indicates if timer is running (True = running) More...
 

Detailed Description

Broadcasts a message using RemoteNotify::Broadcast after a time is elapsed.

Constructor & Destructor Documentation

◆ MessageTimer()

PostureEstimating::MessageTimer::MessageTimer ( std::vector< DelayTimer * >  timers,
RemoteNotify::Broadcast *  broadcast,
std::string  msg,
size_t  time 
)

Constructor for PostureEstimating::MessageTimer

Parameters
notificationTimersList of PostureEstimating::DelayTimers that must not be running for message to be broadcast
broadcasterRemoteNotify::Broadcast used to broadcast the message
msgmessage to be sent
timeThe time to wait before broadcasting message

◆ ~MessageTimer()

PostureEstimating::MessageTimer::~MessageTimer ( )

Member Function Documentation

◆ countdown()

void PostureEstimating::MessageTimer::countdown ( )

Starts timer to countdown, sending a messsage at the end of the countdown.

◆ stopCountdown()

void PostureEstimating::MessageTimer::stopCountdown ( )

Stops the countdown and doesn't send message.

◆ timerEvent()

void PostureEstimating::MessageTimer::timerEvent ( void  )

Broadcasts message using RemoteNotify::Broadcast

Field Documentation

◆ running

bool PostureEstimating::MessageTimer::running
Initial value:
=
false

Boolen which indicates if timer is running (True = running)

◆ time

size_t PostureEstimating::MessageTimer::time

The time the PostureEstimating::MessageTimer waits before broadcasting message


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