GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > ebfio / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

EBF_pkts.c File Reference

EBF pkts, Implementation. This provides an iterator like facility for a vector of packets and some other assorted utilities. More...

#include <EDS/io/EBF_pkts.h>

Functions

int EBF_pktsCount (EBF_pkts pkts)
 Counts the number of packets.
EBF_pkts EBF_pktsLimit (EBF_pkts pkts, int limit)
 Limits the packets to the specified number of packets.
EBF_pkts EBF_pktsSkip (EBF_pkts pkts, int skip)
 Counts the number of packets.
EBF_pkts EBF_pktsSetup (EBF_pkts pkts, int skip, int limit)
 Skips the specified number of packets and then limits the packets vector.


Detailed Description

EBF pkts, Implementation. This provides an iterator like facility for a vector of packets and some other assorted utilities.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: EBF_pkts.c,v 1.4 2011/08/04 19:46:12 russell Exp $

Function Documentation

int EBF_pktsCount ( EBF_pkts  pkts  ) 

Counts the number of packets.

Returns:
The number of packets in pkts
Parameters:
pkts Pointer to the vector of packets to count

References EBF__pktsNext(), _EBF_pkts_u::p, _EBF_pkts_u::ps, and _EBF_pkts_ps::size.

EBF_pkts EBF_pktsLimit ( EBF_pkts  pkts,
int  limit 
)

Limits the packets to the specified number of packets.

Returns:
The limited packets vector
Parameters:
pkts Pointer to the vector of packets to limit
limit The number of packets to limit the vector of packets to
This limits the packets vector to the specified number of packets. If npkts is specified as -1, this is taken as a flag to not limit the packets vector and the packets vector is returned as is. Note that there may be fewer actual packets than limit. All this function guarantees is that there will be no more than @ limit

References EBF__pktsNext(), _EBF_pkts_u::p, _EBF_pkts_u::ps, and _EBF_pkts_ps::size.

Referenced by EBF_pktsSetup().

EBF_pkts EBF_pktsSetup ( EBF_pkts  pkts,
int  skip,
int  limit 
)

Skips the specified number of packets and then limits the packets vector.

Returns:
New packets vector
Parameters:
pkts Pointer to the target vector of packets
skip The number of packets to skip
limit The maximum number of packets, if -1, no limiting is done
If there are insufficient packets to satisfy the request, the empty packets vector is returned. This is merely a convenience function, combining EBF_pktsSkip and EBF_pktsLimit.

References EBF_pktsLimit(), and EBF_pktsSkip().

Referenced by EBF_streamProcess().

EBF_pkts EBF_pktsSkip ( EBF_pkts  pkts,
int  skip 
)

Counts the number of packets.

Returns:
New packets vector
Parameters:
pkts Pointer to the target vector of packets
skip The number of packets to skip

References EBF__pktsNext(), _EBF_pkts_u::p, _EBF_pkts_u::ps, and _EBF_pkts_ps::size.

Referenced by EBF_pktsSetup().


Generated on Fri Dec 9 16:49:19 2011 by  doxygen 1.5.8