#include "forb.h" char * orbpkt_string ( char *srcname, double time, char *packet, int nbytes ); int forbopen ( char *filename, char *representation ); int forbclose ( int orb ); int forbfd ( int orb ) ; int forbput ( int orb, char *srcname, double time, char *packet, int nbytes ); int forbget ( int orb, int which, int *rpktid, char *srcname, double *time, char **packet, int *nbytes, int *bufsize ); int forbreap ( int orb, int *rpktid, char *srcname, double *time, char **packet, int *nbytes, int *bufsize ); int forbtell ( int orb ); int forbseek ( int orb, int which ); int forbafter ( int orb, double atime ); int forbselect ( int orb, char *select ); int forbreject ( int orb, char *reject ); void fakesignal(char *representation, char *srcname, double time, char **packet, int *nsamp, int *bufsize ) ; int fakefill ( char *representation, char *srcname, double time, char **packet, int *nbytes, int *bufsize ) ; int fakecheck ( char *srcname, double time, char *packet, int nbytes ) ;
forbopen and forbclose open either an individual file of forb(5) packets, or a directory containing multiple forb segment files. forbfd returns the open file descriptor in use by the forb routines. When writing a forb file, the user can write comments directly into this file. The file descriptor can change, so it shouldn't be cached, however.
forbput writes out a packet. forbget returns a particular packet; forbreap returns the next packet.
forbtell returns the current pktid (the current position in the forb). forbseek seeks to a particular pktid; forbafter seeks to the first packet with a time after the specified atime.
forbselect selects packets with srcnames matching the input regular expression select. forbreject rejects packets with srcnames matching the input regular expression reject.
Timing on the return of packets is affected by two parameters. The default is to return packets as quickly as they're read, with the original time tags from the file. However, it's also possible to adjust the packet times so that time is close to the current now(), which may be convenient for running simulations. This is done by adding a fixed time to the packet time from the forb, and in this case, packets are not returned until the real time matches or is greater than the packet time tag.
orbpkt_string returns a forb(5) string representation of the input packet.
fakefill generates a fake packet of the specified size, returning the (internal) sequence number.
forbserver(1) forb(5)