$search

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:

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
#define ORO_SCHED_RT   0
#define ORO_WAIT_ABS   0
#define ORO_WAIT_REL   1
#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

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

#define ORO_SCHED_RT   0

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

#define ORO_WAIT_ABS   0

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

#define ORO_WAIT_REL   1

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

#define rtos_printf   printf

Definition at line 423 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 231 of file win32/fosi.h.

typedef CRITICAL_SECTION rt_rec_mutex_t

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

typedef HANDLE rt_sem_t

Definition at line 173 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 108 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 160 of file win32/fosi.h.

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

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

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

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

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

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

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

Definition at line 411 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 389 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 354 of file win32/fosi.h.

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

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

static void rtos_disable_rt_warning (  )  [inline, static]

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

static void rtos_enable_rt_warning (  )  [inline, static]

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

NANO_TIME rtos_get_time_ns ( void   )  [inline]

Get "system" time in nanoseconds

Definition at line 120 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 134 of file win32/fosi.h.

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

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

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

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

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

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

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

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

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

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

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

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

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

Definition at line 291 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 286 of file win32/fosi.h.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Definition at line 207 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 166 of file win32/fosi.h.

TIME_SPEC ticks2timespec ( TICK_TIME  hrt  )  [inline]

Definition at line 112 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 139 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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Mar 1 16:25:18 2013