Orocos Real-Time Toolkit  2.8.3
Classes | Macros | Typedefs | Functions
fosi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sched.h>
#include <assert.h>
#include <limits.h>
#include <float.h>
#include "../oro_limits.h"
#include "../../rtt-config.h"
#include <rtai_config.h>
#include <rtai_lxrt.h>
#include <rtai_sem.h>

Go to the source code of this file.

Classes

struct  oro_rtai_sem_t
 
struct  oro_rtai_cond_t
 
struct  RTOS_TASK
 

Macros

#define _GNU_SOURCE
 This file translates the FOSI (Framework Operating System Interface) from orocos calls to native RTOS calls. More...
 
#define _XOPEN_SOURCE   600
 
#define HAVE_FOSI_API
 
#define __LXRT_USERSPACE__
 
#define SCHED_LXRT_HARD   0 /** LXRT Hard real-time */
 
#define SCHED_LXRT_SOFT   1 /** LXRT Soft real-time */
 
#define ORO_SCHED_RT   0 /** LXRT Hard real-time */
 
#define ORO_SCHED_OTHER   1 /** LXRT Soft real-time */
 
#define ORO_WAIT_ABS   0 /** Not supported for the lxrt target */
 
#define ORO_WAIT_REL   1 /** Not supported for the lxrt target */
 
#define CHK_LXRT_CALL()
 
#define CHK_LXRT_PTR(a)
 

Typedefs

typedef RT_TASK RTOS_RTAI_TASK
 
typedef SEM RTOS_RTAI_SEM
 
typedef CND RTOS_RTAI_CND
 
typedef struct oro_rtai_sem_t rt_sem_t
 
typedef struct oro_rtai_cond_t rt_cond_t
 
typedef rt_sem_t rt_mutex_t
 
typedef rt_sem_t rt_rec_mutex_t
 
typedef long long NANO_TIME
 
typedef long long TICK_TIME
 
typedef struct timespec TIME_SPEC
 

Functions

TIME_SPEC ticks2timespec (TICK_TIME hrt)
 
NANO_TIME rtos_get_time_ns (void)
 Get "system" time in nanoseconds. More...
 
TICK_TIME rtos_get_time_ticks (void)
 Get "system" time in ticks FIXME see https://proj.fmtc.be/orocos-bugzilla/show_bug.cgi?id=60 More...
 
TICK_TIME ticksPerSec (void)
 
TICK_TIME nano2ticks (NANO_TIME t)
 Time conversions from nano seconds to system ticks. More...
 
NANO_TIME ticks2nano (TICK_TIME t)
 Time conversions from system ticks to nano seconds. More...
 
int rtos_nanosleep (const TIME_SPEC *rqtp, TIME_SPEC *rmtp)
 
int rtos_printf (const char *fmt,...)
 'real-time' print function. More...
 

Macro Definition Documentation

#define __LXRT_USERSPACE__

Definition at line 100 of file fosi.h.

#define _GNU_SOURCE

This file translates the FOSI (Framework Operating System Interface) from orocos calls to native RTOS calls.

Definition at line 30 of file fosi.h.

#define _XOPEN_SOURCE   600

Definition at line 35 of file fosi.h.

#define CHK_LXRT_CALL ( )

Definition at line 167 of file fosi.h.

Referenced by rtos_nanosleep().

#define CHK_LXRT_PTR (   a)

Definition at line 168 of file fosi.h.

#define HAVE_FOSI_API

Definition at line 38 of file fosi.h.

#define ORO_SCHED_OTHER   1 /** LXRT Soft real-time */

Definition at line 127 of file fosi.h.

#define ORO_SCHED_RT   0 /** LXRT Hard real-time */

Definition at line 126 of file fosi.h.

#define ORO_WAIT_ABS   0 /** Not supported for the lxrt target */

Definition at line 129 of file fosi.h.

#define ORO_WAIT_REL   1 /** Not supported for the lxrt target */

Definition at line 130 of file fosi.h.

#define SCHED_LXRT_HARD   0 /** LXRT Hard real-time */

Definition at line 124 of file fosi.h.

Referenced by RTT::os::rtai_thread_wrapper().

#define SCHED_LXRT_SOFT   1 /** LXRT Soft real-time */

Definition at line 125 of file fosi.h.

Referenced by RTT::os::rtai_thread_wrapper().

Typedef Documentation

typedef long long NANO_TIME

Definition at line 108 of file fosi.h.

typedef struct oro_rtai_cond_t rt_cond_t

Definition at line 103 of file fosi.h.

Definition at line 104 of file fosi.h.

typedef struct oro_rtai_sem_t rt_sem_t
typedef CND RTOS_RTAI_CND

Definition at line 71 of file fosi.h.

typedef SEM RTOS_RTAI_SEM

Definition at line 70 of file fosi.h.

typedef RT_TASK RTOS_RTAI_TASK

Definition at line 69 of file fosi.h.

typedef long long TICK_TIME

Definition at line 109 of file fosi.h.

typedef struct timespec TIME_SPEC

Definition at line 110 of file fosi.h.

Function Documentation

TICK_TIME nano2ticks ( NANO_TIME  t)
inline

Time conversions from nano seconds to system ticks.

Definition at line 177 of file fosi.h.

NANO_TIME rtos_get_time_ns ( void  )
inline

Get "system" time in nanoseconds.

Definition at line 171 of file fosi.h.

TICK_TIME rtos_get_time_ticks ( void  )
inline

Get "system" time in ticks FIXME see https://proj.fmtc.be/orocos-bugzilla/show_bug.cgi?id=60

Definition at line 173 of file fosi.h.

int rtos_nanosleep ( const TIME_SPEC rqtp,
TIME_SPEC rmtp 
)
inline
int rtos_printf ( const char *  fmt,
  ... 
)
inline
NANO_TIME ticks2nano ( TICK_TIME  t)
inline

Time conversions from system ticks to nano seconds.

Definition at line 178 of file fosi.h.

TIME_SPEC ticks2timespec ( TICK_TIME  hrt)
inline
TICK_TIME ticksPerSec ( void  )
inline

Definition at line 175 of file fosi.h.

Referenced by rtos_printf().