Components/Libraries/XF/FreeRTOS/Thread

(Difference between revisions)
Jump to: navigation, search
(Description)
(Parameters)
Line 39: Line 39:
  
 
=== Parameters ===
 
=== Parameters ===
 +
Event* '''opEv''' : the event whose the delay ends
 +
 
== void threadMain() ==
 
== void threadMain() ==
 
=== Description ===
 
=== Description ===

Revision as of 13:30, 21 August 2017

Contents

Thread

This class is the basic thread of the XFOS. It manages state machines, dispatch the events and schedule timeouts when an event need it. This class contains an event queue where a put events waiting for process.

Member Attributes

Queue _eventQueue : the event queue of the Thread

TimerManager* _pTimerManager : a pointer to the timer manager

Member Functions Documentation

Thread(TimerManager* opTimerManager, std::string oName, PRIORITY_SIZE oPriority, STACKSIZE_SIZE oStackDepth)

Description

The constructor of the Thread. It create the Thread and initialuîze the event queue.

Parameters

TimerManager* opTimerManager : a pointer to the timer manager

string oName  : the name of the thread (basically set as "Event Dispatcher")

PRIORITY_SIZE oPriority : the priority of the thread

STACKSIZE_SIZE oStackDepth : the stack size of the thread (basically set as THREAD_STACK_SIZE)

~Thread() [virtual]

Description

The destructor of the Thread

void pushEvent(Event* opEv, timeSize oTimeToWait) [virtual]

Description

If the event to push has a delay of 0, this function add it in the event queue. If the event needs a delay, this function schedule a timeout to the TimerManager and don't add the event in the queue.

Parameters

Event* opEv : a pointer to the event to push

timeSize oTimeToWait : the time (in ms) to wait if event queue is full (basically set as INFINIT_TIME)

timeoutIndication(Event* opEv)

Description

This method is called by the timer manager when the the delay of an event ends

Parameters

Event* opEv : the event whose the delay ends

void threadMain()

Description

void scheduleTimeout(Event* opEv)

Description

Parameters

void dispatchEvent(Event* opEv) [virtual]

Description

Parameters

void deleteEvent(Event* opEv)

Description

Parameters

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox