vdr-plugin-softhddevice-drm-gles 1.6.8-daba64b
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

cStateMachinem_pStateMachine
 pointer to state machine
 
std::mutex m_mutex
 queue mutex
 
std::vector< Eventm_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 163 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 276 of file statemachine.cpp.

◆ ~cEventHandler()

cEventHandler::~cEventHandler ( void  )

Stop and delete the event handler thread.

Definition at line 286 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 305 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 296 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 175 of file statemachine.h.

Referenced by Action(), and AddEvent().

◆ m_mutex

std::mutex cEventHandler::m_mutex
private

queue mutex

Definition at line 174 of file statemachine.h.

Referenced by Action(), and AddEvent().

◆ m_pStateMachine

cStateMachine* cEventHandler::m_pStateMachine
private

pointer to state machine

Definition at line 173 of file statemachine.h.

Referenced by Action().


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