RTXI 1.3
RT::System Class Reference

#include <rt.h>

List of all members.

Classes

class  SetPeriodEvent

Public Member Functions

long long getPeriod (void) const
int setPeriod (long long period)
void foreachDevice (void(*callback)(Device *, void *), void *param)
void foreachThread (void(*callback)(Thread *, void *), void *param)
int postEvent (Event *event, bool blocking=true)

Static Public Member Functions

static SystemgetInstance (void)

Friends

class Device
class Thread

Detailed Description

Manages the RTOS as well as all objects that require realtime execution.

Definition at line 333 of file rt.h.


Member Function Documentation

void RT::System::foreachDevice ( void(*)(Device *, void *)  callback,
void *  param 
)

Loop through each Device and executes a callback. The callback takes two parameters, a Device pointer and param, the second parameter to foreachDevice.

Parameters:
callbackThe callback function.
paramA parameter to the callback function.
See also:
RT::Device

Definition at line 189 of file rt.cpp.

void RT::System::foreachThread ( void(*)(Thread *, void *)  callback,
void *  param 
)

Loop through each Thread and executes a callback. The callback takes two parameters, a Thread pointer and param, the second parameter to foreachThread.

Parameters:
callbackThe callback function
paramA parameter to the callback function
See also:
RT::Thread

Definition at line 195 of file rt.cpp.

RT::System * RT::System::getInstance ( void  ) [static]

System is a Singleton, which means that there can only be one instance. This function returns a pointer to that single instance.

Returns:
The instance of System.

Definition at line 326 of file rt.cpp.

long long RT::System::getPeriod ( void  ) const [inline]

Get the current period of the System in nanoseconds.

Returns:
The current period

Definition at line 353 of file rt.h.

int RT::System::postEvent ( RT::Event event,
bool  blocking = true 
)

Post an Event for execution by the realtime task, this acts as a mechanism to synchronizing with the realtime task.

Parameters:
eventThe event to be posted.
blockingIf true the call to postEvent is blocking.
Returns:
The value returned from event->callback()
See also:
RT:Event

Definition at line 201 of file rt.cpp.

int RT::System::setPeriod ( long long  period)

Set a new period for the System in nanoseconds.

Parameters:
periodThe new desired period.
Returns:
0 on success, A negative value upon failure.

Definition at line 174 of file rt.cpp.


Friends And Related Function Documentation

friend class Device [friend]

Definition at line 335 of file rt.h.

friend class Thread [friend]

Definition at line 336 of file rt.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines