RTXI  2.4
The Real-Time eXperiment Interface Documentation
Data Structures | Public Member Functions | Static Public Member Functions | Friends
RT::System Class Reference

#include <rt.h>

Collaboration diagram for RT::System:
Collaboration graph

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)
RT::OS::Task getTask ()

Static Public Member Functions

static SystemgetInstance (void)


class Device
class Thread

Detailed Description

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

Definition at line 383 of file rt.h.

Member Function Documentation

◆ foreachDevice()

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.

callbackThe callback function.
paramA parameter to the callback function.
See also

Definition at line 204 of file rt.cpp.

◆ foreachThread()

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.

callbackThe callback function
paramA parameter to the callback function
See also

Definition at line 211 of file rt.cpp.

◆ getInstance()

RT::System * RT::System::getInstance(void )

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

The instance of System.

Definition at line 361 of file rt.cpp.

◆ getPeriod()

long long RT::System::getPeriod(void )const

Get the current period of the System in nanoseconds.

The current period

Definition at line 404 of file rt.h.

◆ getTask()

RT::OS::Task RT::System::getTask()

Return information on the task running in real time.

RT::OS::Task a pointer to the task structure containing the relevant information. The data cannot be modified.

Definition at line 454 of file rt.h.

◆ postEvent()

int RT::System::postEvent(RT::Eventevent,
bool blocking = true 

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

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

Definition at line 218 of file rt.cpp.

◆ setPeriod()

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

Set a new period for the System in nanoseconds.

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

Definition at line 188 of file rt.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ Device

friend class Device

Definition at line 386 of file rt.h.

◆ Thread

friend class Thread

Definition at line 387 of file rt.h.

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