The VisAO Camera
libvisao.h File Reference

VisAO software utilitites, declarations. More...

#include "time.h"
#include "sys/time.h"
#include <sys/shm.h>
#include "fifoutils.h"

Go to the source code of this file.

Macros

#define VISAO_SCHED_POLICY   SCHED_FIFO
 The real-time scheduling policy used by the VisAO system.
 
#define PROMPT_UP   1
 
#define PROMPT_DOWN   2
 
#define PROMPT_INT   3
 
#define FTYPE_NORMAL   0
 
#define FTYPE_SDI   1
 
#define FTYPE_CORON   2
 
#define RTSIGTIMEOUT   (RTSIGPING + 1)
 
#define SYS_N_CORES   6
 Number of physical processors in the system.
 
#define SYS_N_VCORES   12
 Number of virtual processors in the system.
 
#define SYS_N_DRV   2
 Number of physical drives in the system.
 
#define SYS_N_LOGDRV   6
 Number of logical drives in the system.
 
#define set_global_error_report(er)   void (*global_error_report)(const char*, const char*, int) = er
 Macro for declaring and setting the error reporting global.
 
#define set_global_log_info(li)   void (*global_log_info)(const char*) = li
 Macro for declaring and setting the info logging global.
 

Functions

void fifo_error_message (const char *, const char *, int)
 The fifoutils error reporting function. More...
 
int get_dio_fnames (char *fout, char *fin, char *fbase, int ch)
 Fills in the properly formatted dioserver channel fifo names.
 
double ts_to_curr_time (struct timespec *tsp)
 Convert a timespec structure to double seconds.
 
double tv_to_curr_time (struct timeval *tvp)
 Convert a timeval structure to double seconds.
 
double get_curr_time (void)
 Gets the current CLOCK_REALTIME time, returns it in seconds to double precision.
 
int create_shmem (int *shmemid, key_t mkey, size_t sz)
 Create a shared memory buffer.
 
void * attach_shm (size_t *sz, key_t mkey, int shmemid)
 Attach to a shared memory buffer and get its size.
 
double ComputeFramerate (double delay_base, double delay_inc, int rep)
 Calculate frame rate given Little Joe program parameters.
 
int ComputeRepsFrameRate (double delay_base, double delay_inc, double fr)
 
int ComputeRepsExpTime (double delay_base, double delay_inc, double et)
 
int sigproof_sleep (double secs, int *dienow)
 Signal proof sleep function. More...
 

Variables

void(* global_error_report )(const char *, const char *, int)
 A global error reporting function, arguments are the report, file, and line. More...
 
void(* global_log_info )(const char *)
 A global info logging function. More...
 

Detailed Description

Author
Jared R. Males

Definition in file libvisao.h.

Function Documentation

void fifo_error_message ( const char *  ,
const char *  ,
int   
)

This passes the ERRMSG macro in fifoutils out to the global_error_report.

Definition at line 18 of file libvisaoc.c.

int sigproof_sleep ( double  secs,
int dienow 
)

Sleeps for at least secs seconds, even if interrupted by a handled signal. May sleep for longer if signal handling takes a long time. Monitors the integer pointed by dienow and exits if it becomes 1 set dienow to 0 to ignore.

Definition at line 161 of file libvisaoc.c.

References get_curr_time().

Variable Documentation

void(* global_error_report) (const char *, const char *, int)

This is used by various library functions and classes that aren't derived from one of the Apps.

Referenced by attach_shm(), and create_shmem().

void(* global_log_info) (const char *)

This is used by various library functions and classes that aren't derived from one of the Apps.

Referenced by attach_shm(), and create_shmem().