Classes | Defines | Typedefs | Functions | Variables
fosi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include "../oro_limits.h"
#include "../../rtt-config.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "dlfcn.h"
Include dependency graph for win32/fosi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oro_timespec
struct  rt_cond_t
struct  RTOS_TASK

Defines

#define HAVE_FOSI_API
#define ORO_SCHED_OTHER   1 /** Linux normal scheduler */
#define ORO_SCHED_RT   0 /** Linux FIFO scheduler */
#define ORO_WAIT_ABS
#define ORO_WAIT_REL
#define rtos_printf   printf

Typedefs

typedef long long NANO_TIME
typedef CRITICAL_SECTION rt_mutex_t
typedef CRITICAL_SECTION rt_rec_mutex_t
typedef HANDLE rt_sem_t
typedef long long TICK_TIME
typedef struct oro_timespec TIME_SPEC

Functions

long long nano2ticks (long long nano)
static int rtos_cond_broadcast (rt_cond_t *cond)
static int rtos_cond_destroy (rt_cond_t *cond)
static int rtos_cond_init (rt_cond_t *cond)
static int rtos_cond_signal (rt_cond_t *cond)
static int rtos_cond_timedwait (rt_cond_t *cond, rt_mutex_t *mutex, NANO_TIME abs_time)
static int rtos_cond_timedwait_internal (rt_cond_t *cond, rt_mutex_t *external_mutex, DWORD ms)
static int rtos_cond_wait (rt_cond_t *cond, rt_mutex_t *mutex)
static void rtos_disable_rt_warning ()
static void rtos_enable_rt_warning ()
NANO_TIME rtos_get_time_ns (void)
TICK_TIME rtos_get_time_ticks ()
static int rtos_mutex_destroy (rt_mutex_t *m)
static int rtos_mutex_init (rt_mutex_t *m)
static int rtos_mutex_lock (rt_mutex_t *m)
static int rtos_mutex_lock_until (rt_mutex_t *m, NANO_TIME abs_time)
static int rtos_mutex_rec_destroy (rt_rec_mutex_t *m)
static int rtos_mutex_rec_init (rt_rec_mutex_t *m)
static int rtos_mutex_rec_lock (rt_rec_mutex_t *m)
static int rtos_mutex_rec_lock_until (rt_mutex_t *m, NANO_TIME abs_time)
static int rtos_mutex_rec_trylock (rt_rec_mutex_t *m)
static int rtos_mutex_rec_unlock (rt_rec_mutex_t *m)
static int rtos_mutex_trylock (rt_mutex_t *m)
static int rtos_mutex_unlock (rt_mutex_t *m)
int rtos_nanosleep (const TIME_SPEC *rqtp, TIME_SPEC *rmtp)
static int rtos_sem_destroy (rt_sem_t *m)
static int rtos_sem_init (rt_sem_t *m, int value)
static int rtos_sem_signal (rt_sem_t *m)
static int rtos_sem_trywait (rt_sem_t *m)
static int rtos_sem_value (rt_sem_t *m)
static int rtos_sem_wait (rt_sem_t *m)
static int rtos_sem_wait_timed (rt_sem_t *m, NANO_TIME delay)
static int rtos_sem_wait_until (rt_sem_t *m, NANO_TIME abs_time)
int setenv (const char *name, const char *value, int overwrite)
RTT_API unsigned int sleep (unsigned int seconds)
long long ticks2nano (long long count)
TIME_SPEC ticks2timespec (TICK_TIME hrt)
RTT_API int usleep (unsigned int us)
int win32_nanosleep (long long nano)

Variables

const NANO_TIME InfiniteNSecs = LLONG_MAX
const double InfiniteSeconds = DBL_MAX
const TICK_TIME InfiniteTicks = LLONG_MAX

Define Documentation

#define HAVE_FOSI_API

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

Definition at line 28 of file win32/fosi.h.

#define ORO_SCHED_OTHER   1 /** Linux normal scheduler */

Definition at line 98 of file win32/fosi.h.

#define ORO_SCHED_RT   0 /** Linux FIFO scheduler */

Definition at line 97 of file win32/fosi.h.

#define ORO_WAIT_ABS
Value:
0 

Definition at line 81 of file win32/fosi.h.

#define ORO_WAIT_REL
Value:
1 

Definition at line 82 of file win32/fosi.h.

#define rtos_printf   printf

Definition at line 421 of file win32/fosi.h.


Typedef Documentation

typedef long long NANO_TIME

Definition at line 73 of file win32/fosi.h.

typedef CRITICAL_SECTION rt_mutex_t

Definition at line 229 of file win32/fosi.h.

typedef CRITICAL_SECTION rt_rec_mutex_t

Definition at line 230 of file win32/fosi.h.

typedef HANDLE rt_sem_t

Definition at line 171 of file win32/fosi.h.

typedef long long TICK_TIME

Definition at line 74 of file win32/fosi.h.

typedef struct oro_timespec TIME_SPEC

Definition at line 106 of file win32/fosi.h.


Function Documentation

long long nano2ticks ( long long  nano) [inline]

No conversions are needed in userspace. The HBGenerator needs this for accurate timekeeping, which is an anachronism in userspace.

Definition at line 158 of file win32/fosi.h.

static int rtos_cond_broadcast ( rt_cond_t cond) [inline, static]

Definition at line 397 of file win32/fosi.h.

static int rtos_cond_destroy ( rt_cond_t cond) [inline, static]

Definition at line 342 of file win32/fosi.h.

static int rtos_cond_init ( rt_cond_t cond) [inline, static]

Definition at line 321 of file win32/fosi.h.

static int rtos_cond_signal ( rt_cond_t cond) [inline, static]

Definition at line 409 of file win32/fosi.h.

static int rtos_cond_timedwait ( rt_cond_t cond,
rt_mutex_t mutex,
NANO_TIME  abs_time 
) [inline, static]

Definition at line 387 of file win32/fosi.h.

static int rtos_cond_timedwait_internal ( rt_cond_t cond,
rt_mutex_t external_mutex,
DWORD  ms 
) [inline, static]

Definition at line 352 of file win32/fosi.h.

static int rtos_cond_wait ( rt_cond_t cond,
rt_mutex_t mutex 
) [inline, static]

Definition at line 392 of file win32/fosi.h.

static void rtos_disable_rt_warning ( ) [inline, static]

Definition at line 303 of file win32/fosi.h.

static void rtos_enable_rt_warning ( ) [inline, static]

Definition at line 299 of file win32/fosi.h.

NANO_TIME rtos_get_time_ns ( void  ) [inline]

Get "system" time in nanoseconds

Definition at line 118 of file win32/fosi.h.

TICK_TIME rtos_get_time_ticks ( void  ) [inline]

This function should return ticks, but we use ticks == nsecs in userspace

Definition at line 132 of file win32/fosi.h.

static int rtos_mutex_destroy ( rt_mutex_t m) [inline, static]

Definition at line 238 of file win32/fosi.h.

static int rtos_mutex_init ( rt_mutex_t m) [inline, static]

Definition at line 232 of file win32/fosi.h.

static int rtos_mutex_lock ( rt_mutex_t m) [inline, static]

Definition at line 254 of file win32/fosi.h.

static int rtos_mutex_lock_until ( rt_mutex_t m,
NANO_TIME  abs_time 
) [inline, static]

Definition at line 277 of file win32/fosi.h.

static int rtos_mutex_rec_destroy ( rt_rec_mutex_t m) [inline, static]

Definition at line 249 of file win32/fosi.h.

static int rtos_mutex_rec_init ( rt_rec_mutex_t m) [inline, static]

Definition at line 244 of file win32/fosi.h.

static int rtos_mutex_rec_lock ( rt_rec_mutex_t m) [inline, static]

Definition at line 289 of file win32/fosi.h.

static int rtos_mutex_rec_lock_until ( rt_mutex_t m,
NANO_TIME  abs_time 
) [inline, static]

Definition at line 284 of file win32/fosi.h.

static int rtos_mutex_rec_trylock ( rt_rec_mutex_t m) [inline, static]

Definition at line 272 of file win32/fosi.h.

static int rtos_mutex_rec_unlock ( rt_rec_mutex_t m) [inline, static]

Definition at line 294 of file win32/fosi.h.

static int rtos_mutex_trylock ( rt_mutex_t m) [inline, static]

Definition at line 266 of file win32/fosi.h.

static int rtos_mutex_unlock ( rt_mutex_t m) [inline, static]

Definition at line 260 of file win32/fosi.h.

int rtos_nanosleep ( const TIME_SPEC rqtp,
TIME_SPEC rmtp 
) [inline]

Definition at line 147 of file win32/fosi.h.

static int rtos_sem_destroy ( rt_sem_t m) [inline, static]

Definition at line 179 of file win32/fosi.h.

static int rtos_sem_init ( rt_sem_t m,
int  value 
) [inline, static]

Definition at line 173 of file win32/fosi.h.

static int rtos_sem_signal ( rt_sem_t m) [inline, static]

Definition at line 185 of file win32/fosi.h.

static int rtos_sem_trywait ( rt_sem_t m) [inline, static]

Definition at line 195 of file win32/fosi.h.

static int rtos_sem_value ( rt_sem_t m) [inline, static]

Definition at line 212 of file win32/fosi.h.

static int rtos_sem_wait ( rt_sem_t m) [inline, static]

Definition at line 190 of file win32/fosi.h.

static int rtos_sem_wait_timed ( rt_sem_t m,
NANO_TIME  delay 
) [inline, static]

Definition at line 200 of file win32/fosi.h.

static int rtos_sem_wait_until ( rt_sem_t m,
NANO_TIME  abs_time 
) [inline, static]

Definition at line 205 of file win32/fosi.h.

int setenv ( const char *  name,
const char *  value,
int  overwrite 
)

Definition at line 64 of file fosi.cpp.

RTT_API unsigned int sleep ( unsigned int  seconds)

Definition at line 51 of file fosi.cpp.

long long ticks2nano ( long long  count) [inline]

Definition at line 164 of file win32/fosi.h.

TIME_SPEC ticks2timespec ( TICK_TIME  hrt) [inline]

Definition at line 110 of file win32/fosi.h.

RTT_API int usleep ( unsigned int  us)

Definition at line 58 of file fosi.cpp.

int win32_nanosleep ( long long  nano) [inline]

Definition at line 137 of file win32/fosi.h.


Variable Documentation

const NANO_TIME InfiniteNSecs = LLONG_MAX

Definition at line 78 of file win32/fosi.h.

const double InfiniteSeconds = DBL_MAX

Definition at line 79 of file win32/fosi.h.

const TICK_TIME InfiniteTicks = LLONG_MAX

Definition at line 77 of file win32/fosi.h.



rtt
Author(s): RTT Developers
autogenerated on Fri Sep 9 2016 04:02:17