vdr-plugin-softhddevice-drm-gles 1.7.3-98a2ef7
cEventHandler Class Reference

Event handler thread. More...

#include <statemachine.h>

Public Member Functions

 cEventHandler (cStateMachine *)
 Create and start the event handler thread.
 
 ~cEventHandler (void)
 Stop and delete the event handler thread.
 
void AddEvent (Event)
 Add an event to the queue.
 

Protected Member Functions

void Action (void)
 Periodically send events in the queue to the final event receiver/handler.
 

Private Attributes

cStateMachine * m_pStateMachine
 pointer to state machine
 
std::mutex m_mutex
 queue mutex
 
std::vector< Event > m_eventQueue
 event fifo queue
 

Detailed Description

Event handler thread.

Queues events and sends them to the state machine cStateMachine as the final event receiver

Definition at line 164 of file statemachine.h.

Constructor & Destructor Documentation

◆ cEventHandler()

cEventHandler::cEventHandler ( cStateMachine *  statemachine)

Create and start the event handler thread.

Parameters
statemachinepointer to the cStateMachine object as the final event receiver

Definition at line 277 of file statemachine.cpp.

◆ ~cEventHandler()

cEventHandler::~cEventHandler ( void  )

Stop and delete the event handler thread.

Definition at line 287 of file statemachine.cpp.

Member Function Documentation

◆ Action()

void cEventHandler::Action ( void  )
protected

Periodically send events in the queue to the final event receiver/handler.

Definition at line 306 of file statemachine.cpp.

References LOGDEBUG, m_eventQueue, m_mutex, m_pStateMachine, and cStateMachine::OnEventReceived().

◆ AddEvent()

void cEventHandler::AddEvent ( Event  event)

Add an event to the queue.

Parameters
eventevent, which should be added to the queue

Definition at line 297 of file statemachine.cpp.

References m_eventQueue, and m_mutex.

Referenced by cSoftHdDevice::SetDisplayMode().

Member Data Documentation

◆ m_eventQueue

std::vector<Event> cEventHandler::m_eventQueue
private

event fifo queue

Definition at line 176 of file statemachine.h.

Referenced by Action(), and AddEvent().

◆ m_mutex

std::mutex cEventHandler::m_mutex
private

queue mutex

Definition at line 175 of file statemachine.h.

Referenced by Action(), and AddEvent().

◆ m_pStateMachine

cStateMachine* cEventHandler::m_pStateMachine
private

pointer to state machine

Definition at line 174 of file statemachine.h.

Referenced by Action().


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