GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FES / V6-4-2 > fes / i845e
Classes | |
struct | fesBufStats_s |
Buffer statistics block. More... | |
Typedefs | |
typedef struct fesBuf_s | fesBuf_t |
Buffer handle. | |
typedef struct fesBufStats_s | fesBufStats_t |
Buffer statistics block. | |
Functions | |
fesBuf_t * | fesBufAlloc (void) |
Allocate a buffer. | |
int | fesBufBytesUsedGet (fesBuf_t *buf) |
Get number of bytes used. | |
int | fesBufBytesUsedSet (fesBuf_t *buf, int count) |
Set number of bytes used. | |
int | fesBufDataAlignment (fesBuf_t *buf) |
Get data alignment. | |
int | fesBufDataOffsetGet (fesBuf_t *buf) |
Get data offset. | |
int | fesBufDataOffsetSet (fesBuf_t *buf, int offset) |
Set data offset. | |
char * | fesBufDataStartGet (fesBuf_t *buf) |
Get data address. | |
void | fesBufFree (fesBuf_t *buf) |
Free a buffer. | |
int | fesBufLibDeInit (void) |
De-initialize the buffer allocation system. | |
int | fesBufLibInit (int nBuffers, int size, int alignment) |
Initialize the buffer allocation system. | |
void | fesBufListShow (int list, int first, int count) |
Show contents of a buffer pool list. | |
void | fesBufPoolShow (void) |
Show buffer pool statistics. | |
void | fesBufShow (fesBuf_t *buf) |
Show buffer parameters. | |
int | fesBufSize (fesBuf_t *buf) |
Get buffer size. | |
char * | fesBufStart (fesBuf_t *buf) |
Get buffer address. | |
void | fesBufStatsGet (fesBufStats_t *uStats) |
Get buffer pool statistics. | |
unsigned int | fesBufUserFieldGet (fesBuf_t *buf) |
Get the user field. | |
void | fesBufUserFieldSet (fesBuf_t *buf, unsigned int val) |
Set the user field. |
$Id: fesBufLib.h,v 1.7 2010/07/26 18:44:03 saxton Exp $
fesBuf_t* fesBufAlloc | ( | void | ) |
Allocate a buffer.
A buffer is allocated from the available pool, and its various associated parameters (data, offset, bytes used, and user) cleared.
int fesBufBytesUsedGet | ( | fesBuf_t * | buf | ) |
Get number of bytes used.
This routine returns the number of bytes used in the specified buffer.
buf | The handle for the buffer. |
int fesBufBytesUsedSet | ( | fesBuf_t * | buf, | |
int | count | |||
) |
Set number of bytes used.
This routine sets the number of bytes used in the specified buffer.
buf | The handle for the buffer. | |
count | The number of bytes used. |
FES_SUCCESS | The operation was successful. | |
FES_INVPARMV | The bytes used value was invalid. |
int fesBufDataAlignment | ( | fesBuf_t * | buf | ) |
Get data alignment.
This routine returns the alignment of the data portion of the specified buffer.
buf | The handle for the buffer. |
int fesBufDataOffsetGet | ( | fesBuf_t * | buf | ) |
Get data offset.
This routine returns the offset from the beginning of the specified buffer to the start of its data.
buf | The handle for the buffer. |
int fesBufDataOffsetSet | ( | fesBuf_t * | buf, | |
int | offset | |||
) |
Set data offset.
This routine sets the offset from the beginning of the specified buffer to the start of the data, thereby changing the data start address as well.
buf | The handle for the buffer. | |
offset | The offset value to set. |
FES_SUCCESS | The operation was successful. | |
FES_INVPARMV | The bytes used value was invalid. |
char* fesBufDataStartGet | ( | fesBuf_t * | buf | ) |
Get data address.
This routine returns the data start address for the specified buffer.
buf | The handle for the buffer. |
void fesBufFree | ( | fesBuf_t * | buf | ) |
Free a buffer.
The specified buffer is freed, and so made available for later re-allocation.
buf | The handle for the buffer to be freed. |
int fesBufLibDeInit | ( | void | ) |
De-initialize the buffer allocation system.
The buffer allocation system is de-initialized by freeing all the allocated memory.
FES_SUCCESS | Always successful. |
int fesBufLibInit | ( | int | nBuffers, | |
int | size, | |||
int | alignment | |||
) |
Initialize the buffer allocation system.
This routine initializes the buffer allocation system by allocating a piece of memory containing all the buffers and putting them all on the free list.
nBuffers | The number of buffers to allocate. | |
size | The size of each buffer, in bytes. | |
alignment | The alignment of each buffer, which must be a power of 2. |
FES_SUCCESS | Initialization was successful, or had previously been completed. | |
FES_NOSEMCRE | Unable to create interlock semaphore. | |
FES_NOMEMORY | Insufficient memory available. |
void fesBufListShow | ( | int | list, | |
int | first, | |||
int | count | |||
) |
Show contents of a buffer pool list.
This routine displays the parameters of the specified buffers on the specified (free or allocated) list.
list | Specifies which list to use: zero = free, non-zero = allocated. | |
first | The first buffer to be displayed, starting from 1. | |
count | The number of buffers to be displayed. |
void fesBufPoolShow | ( | void | ) |
Show buffer pool statistics.
This routine displays overall statistics for the buffer pool.
void fesBufShow | ( | fesBuf_t * | buf | ) |
Show buffer parameters.
This routine displays the parameters of the specified buffer.
buf | The handle for the buffer. |
int fesBufSize | ( | fesBuf_t * | buf | ) |
Get buffer size.
This routine returns the size of the specified buffer.
buf | The handle for the buffer. |
char* fesBufStart | ( | fesBuf_t * | buf | ) |
Get buffer address.
This routine returns the address of the specified buffer.
buf | The handle for the buffer. |
void fesBufStatsGet | ( | fesBufStats_t * | uStats | ) |
Get buffer pool statistics.
This routine returns the buffer pool statistics.
uStats | The address of an area to receive the statistics block. |
unsigned int fesBufUserFieldGet | ( | fesBuf_t * | buf | ) |
Get the user field.
This routine returns the user field of the specified buffer.
buf | The handle for the buffer. |
void fesBufUserFieldSet | ( | fesBuf_t * | buf, | |
unsigned int | val | |||
) |
Set the user field.
This routine sets the user field of the specified buffer.
buf | The handle for the buffer. | |
val | The user field value. |