RTXI  2.4
The Real-Time eXperiment Interface Documentation
Typedefs | Functions
RT::OS Namespace Reference

Typedefs

typedef void * Task
 

Functions

int initiate (void)
 
void shutdown (void)
 
int createTask (Task *, void *(*)(void *), void *, int=0)
 
void deleteTask (Task)
 
int setPeriod (Task, long long)
 
void sleepTimestep (Task)
 
bool isRealtime (void)
 
long long getTime (void)
 
double getCpuUsage (void)
 

Typedef Documentation

◆ Task

typedef void* RT::OS::Task

Definition at line 40 of file rt.h.

Function Documentation

◆ createTask()

int RT::OS::createTask(Task,
void * *)(void *,
void * ,
int = 0 
)

◆ deleteTask()

void RT::OS::deleteTask(Task task)

Definition at line 126 of file rt_os-posix.cpp.

◆ getCpuUsage()

double RT::OS::getCpuUsage(void )

Returns the percentage of Cpu being used by the Real-Time Thread. Should not be run from the real-time thread directly as this can cause high latency.

Returns
CPU_TIME Percentage of time the cpu is spent on real-time thread calculations. In multicore systems it is the percent of Cpu for the specific processor running the real-time task.

Definition at line 183 of file rt_os-posix.cpp.

Here is the call graph for this function:

◆ getTime()

long long RT::OS::getTime(void )

Returns the current CPU time in nanoseconds. In general this is really only useful for determining the time between two events.

Returns
The current CPU time.

Definition at line 143 of file rt_os-posix.cpp.

◆ initiate()

int RT::OS::initiate(void )

Definition at line 47 of file rt_os-posix.cpp.

◆ isRealtime()

bool RT::OS::isRealtime(void )

Definition at line 136 of file rt_os-posix.cpp.

◆ setPeriod()

int RT::OS::setPeriod(Task task,
long long period 
)

Definition at line 152 of file rt_os-posix.cpp.

Here is the call graph for this function:

◆ shutdown()

void RT::OS::shutdown(void )

Definition at line 71 of file rt_os-posix.cpp.

◆ sleepTimestep()

void RT::OS::sleepTimestep(Task task)

Definition at line 162 of file rt_os-posix.cpp.

Here is the call graph for this function: