GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSF / V2-0-1

Constituent: lsfutils     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LSF_scan.h File Reference

Interface to a generic LSF scan routine. More...

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _LSF_scanRecordHandler
 Binds a record handling routine with a context parameter. More...
struct  _LSF_scanContributionHandler
 Binds a contribution handling routine with a context parameter. More...
struct  _LSF_scanDatagramHandler
 Binds a datagram handling routine with a context parameter. More...

Typedefs

typedef enum _LSF_SCAN_STATUS_V LSF_SCAN_STATUS_V
 Typedef for enum _LSF_SCAN_STATUS_V.
typedef enum _LSF_SCAN_STATUS_M LSF_SCAN_STATUS_M
 Typedef for enum _LSF_SCAN_STATUS_M.
typedef unsigned int(* LSF_scanRecordRtn )(void *ctx, const LSF_record *rec)
 Routine to handle an LSF record.
typedef _LSF_scanRecordHandler LSF_scanRecordHandler
 Typedef of struct _LSF_scanRecordHandler.
typedef LSF_scanRecordHandler(* LSF_scanContributionRtn )(void *ctx, const LSF_contribution *ctb)
 Routine to handle an LSF contribution.
typedef _LSF_scanContributionHandler LSF_scanContributionHandler
 Typedef of struct _LSF_scanContributionHandler.
typedef LSF_scanContributionHandler(* LSF_scanDatagramRtn )(void *ctx, const LSF_datagram *dgm)
 Routine to handle an LSF datagram.
typedef _LSF_scanDatagramHandler LSF_scanDatagramHandler
 Typedef of struct _LSF_scanDatagramHandler.

Enumerations

enum  _LSF_SCAN_STATUS_V {
  LSF_SCAN_STATUS_V_DGM = 0x0,
  LSF_SCAN_STATUS_V_DGM_UNDFLW = LSF_SCAN_STATUS_V_DGM + 0,
  LSF_SCAN_STATUS_V_DGM_OVRFLW = LSF_SCAN_STATUS_V_DGM + 1,
  LSF_SCAN_STATUS_V_DGM_ROOT_UNDFLW = LSF_SCAN_STATUS_V_DGM + 2,
  LSF_SCAN_STATUS_V_DGM_ROOT_OVRFLW = LSF_SCAN_STATUS_V_DGM + 3,
  LSF_SCAN_STATUS_V_DGM_USR_ABORT = LSF_SCAN_STATUS_V_DGM + 4,
  LSF_SCAN_STATUS_V_CTB = 0x8,
  LSF_SCAN_STATUS_V_CTB_UNDFLW = LSF_SCAN_STATUS_V_CTB + 0,
  LSF_SCAN_STATUS_V_CTB_OVRFLW = LSF_SCAN_STATUS_V_CTB + 1,
  LSF_SCAN_STATUS_V_CTB_USR_ABORT = LSF_SCAN_STATUS_V_CTB + 4,
  LSF_SCAN_STATUS_V_REC = 0x10,
  LSF_SCAN_STATUS_V_REC_UNDFLW = LSF_SCAN_STATUS_V_REC + 0,
  LSF_SCAN_STATUS_V_REC_OVRFLW = LSF_SCAN_STATUS_V_REC + 1,
  LSF_SCAN_STATUS_V_REC_USR_ABORT = LSF_SCAN_STATUS_V_REC + 4
}
 Enumerates the error conditions in scan status word, right justified bit offsets. More...
enum  _LSF_SCAN_STATUS_M {
  LSF_SCAN_STATUS_M_DGM = 0xFF << LSF_SCAN_STATUS_V_DGM,
  LSF_SCAN_STATUS_M_DGM_UNDFLW = 1 << LSF_SCAN_STATUS_V_DGM_UNDFLW,
  LSF_SCAN_STATUS_M_DGM_OVRFLW = 1 << LSF_SCAN_STATUS_V_DGM_OVRFLW,
  LSF_SCAN_STATUS_M_DGM_ROOT_UNDFLW = 1 << LSF_SCAN_STATUS_V_DGM_ROOT_UNDFLW,
  LSF_SCAN_STATUS_M_DGM_ROOT_OVRFLW = 1 << LSF_SCAN_STATUS_V_DGM_ROOT_OVRFLW,
  LSF_SCAN_STATUS_M_DGM_USR_ABORT = 1 << LSF_SCAN_STATUS_V_DGM_USR_ABORT,
  LSF_SCAN_STATUS_M_CTB = 0XFF << LSF_SCAN_STATUS_V_CTB,
  LSF_SCAN_STATUS_M_CTB_UNDFLW = 1 << LSF_SCAN_STATUS_V_CTB_UNDFLW,
  LSF_SCAN_STATUS_M_CTB_OVRFLW = 1 << LSF_SCAN_STATUS_V_CTB_OVRFLW,
  LSF_SCAN_STATUS_M_CTB_USR_ABORT = 1 << LSF_SCAN_STATUS_V_CTB_USR_ABORT,
  LSF_SCAN_STATUS_M_REC = 0XFF << LSF_SCAN_STATUS_V_REC,
  LSF_SCAN_STATUS_M_REC_UNDFLW = 1 << LSF_SCAN_STATUS_V_REC_UNDFLW,
  LSF_SCAN_STATUS_M_REC_OVRFLW = 1 << LSF_SCAN_STATUS_V_REC_OVRFLW,
  LSF_SCAN_STATUS_M_REC_USR_ABORT = 1 << LSF_SCAN_STATUS_V_REC_USR_ABORT
}
 Enumerates the error conditions in scan status word, in place mask. More...

Functions

unsigned int LSF_scanDatagrams (const LSF_datagram *dgms, unsigned int dgms_len, LSF_scanDatagramRtn dgm_rtn, void *dgm_ctx)
 Scans through the input set of LSF datagrams.
unsigned int LSF_scanContributions (const LSF_contribution *ctbs, unsigned int ctbs_len, LSF_scanContributionRtn ctb_rtn, void *ctb_ctx)
 Scans through the input LSF contributions processing each contribution.
unsigned int LSF_scanRecords (const LSF_record *recs, unsigned int recs_len, LSF_scanRecordRtn rec_rtn, void *rec_ctx)
 Loops through the set of LSF records.
unsigned int LSF_scanDatagram (const LSF_datagram *dgm, LSF_scanContributionRtn ctb_rtn, void *ctb_ctx)
 Scans through the input LSF datagram.
unsigned int LSF_scanDatagramRoot (const LSF_datagram *dgm, LSF_scanContributionRtn ctb_rtn, void *ctb_ctx)
 Scans through the root contributions of input LSF datagram.
unsigned int LSF_scanContribution (const LSF_contribution *ctb, LSF_scanRecordRtn rec_rtn, void *rec_ctx)
 Scans through the input LSF datagram.

Detailed Description

Interface to a generic LSF scan routine.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: LSF_scan.h,v 1.4 2005/11/02 17:18:20 russell Exp $

Typedef Documentation

LSF_SCAN_STATUS_V
 

Typedef for enum _LSF_SCAN_STATUS_V.

Overview
The status word is 32-bit word that can be though of as 4 bytes, each giving an 8 bit status. The 4-bytes describe
  • Datagram errors, Byte 0 (Least Significant)
  • Contribtution errors, Byte 1
  • Record errors, Byte 2
  • Reserved, Byte 3 (Most Significant)

Currently each of the defined bytes are broken into 2 nibbles,
  • System errors (low nibble)
  • User errors (high nibble)
There are two system errors defined
  • Underflow, this means the length was smaller that header size since the length includes the size of the header, this is an error
  • Overflow, this means the length was so large that it advanced the next place to read past the defined boundaries of the containing object
There is only one user defined status. Raising this status aborts the scan of the current object (i.e. terminates scanning a list of records, a list of contributions, or a list of datagrams.

LSF_scanRecordHandler(* LSF_scanContributionRtn)(void *ctx, const LSF_contribution *ctb)
 

Routine to handle an LSF contribution.

Returns:
The record handling routine for this contribution (if any)
Parameters:
ctx User context parameter
rec The record to handle

LSF_scanContributionHandler(* LSF_scanDatagramRtn)(void *ctx, const LSF_datagram *dgm)
 

Routine to handle an LSF datagram.

Returns:
The contribution handling routine for this datagram
Parameters:
ctx User context parameter
dgm The datagram to handle

unsigned int LSF_scanRecordRtn
 

Routine to handle an LSF record.

Parameters:
ctx User context parameter
rec The record to handle


Enumeration Type Documentation

enum _LSF_SCAN_STATUS_M
 

Enumerates the error conditions in scan status word, in place mask.

Enumerator:
LSF_SCAN_STATUS_M_DGM  Base of datagram status byte
LSF_SCAN_STATUS_M_DGM_UNDFLW  Length error on datagram, too small
LSF_SCAN_STATUS_M_DGM_OVRFLW  Length error on datagram, too large
LSF_SCAN_STATUS_M_DGM_ROOT_UNDFLW  Length error on the root contribution to the datagram, too small
LSF_SCAN_STATUS_M_DGM_ROOT_OVRFLW  Length error on the root contribution to the datagram, too large
LSF_SCAN_STATUS_M_DGM_USR_ABORT  User abort, datagram scan
LSF_SCAN_STATUS_M_CTB  Length error on contribution
LSF_SCAN_STATUS_M_CTB_UNDFLW  Length error on contribution, too small
LSF_SCAN_STATUS_M_CTB_OVRFLW  Length error on contribution, too large
LSF_SCAN_STATUS_M_CTB_USR_ABORT  User abort, contributions scan
LSF_SCAN_STATUS_M_REC  Record status byte
LSF_SCAN_STATUS_M_REC_UNDFLW  Length error on record, too small
LSF_SCAN_STATUS_M_REC_OVRFLW  Length error on record, too large
LSF_SCAN_STATUS_M_REC_USR_ABORT  User abort, record scan

enum _LSF_SCAN_STATUS_V
 

Enumerates the error conditions in scan status word, right justified bit offsets.

Enumerator:
LSF_SCAN_STATUS_V_DGM  Base of datagram status byte
LSF_SCAN_STATUS_V_DGM_UNDFLW  Length error on datagram, too small
LSF_SCAN_STATUS_V_DGM_OVRFLW  Length error on datagram, too large
LSF_SCAN_STATUS_V_DGM_ROOT_UNDFLW  Length error on root contribution to the datagram, too small
LSF_SCAN_STATUS_V_DGM_ROOT_OVRFLW  Length error on root contribution to the datagram, too large
LSF_SCAN_STATUS_V_DGM_USR_ABORT  User abort, datagram scan
LSF_SCAN_STATUS_V_CTB  Length error on contribution
LSF_SCAN_STATUS_V_CTB_UNDFLW  Length error on contribution, too small
LSF_SCAN_STATUS_V_CTB_OVRFLW  Length error on contribution, too large
LSF_SCAN_STATUS_V_CTB_USR_ABORT  User abort, contributions scan
LSF_SCAN_STATUS_V_REC  Record status byte
LSF_SCAN_STATUS_V_REC_UNDFLW  Length error on record, too small
LSF_SCAN_STATUS_V_REC_OVRFLW  Length error on record, too large
LSF_SCAN_STATUS_V_REC_USR_ABORT  User abort, record scan


Function Documentation

unsigned int LSF_scanContribution const LSF_contribution ctb,
LSF_scanRecordRtn  rec_rtn,
void *  rec_ctx
 

Scans through the input LSF datagram.

Returns:
The return value of LSF_scanContributions, really the return value of the ctb_handler.
Parameters:
ctb The contribution to scan
rec_rtn The record level handling routine for this contribution
rec_ctx The context parameter for ctb

unsigned int LSF_scanContributions const LSF_contribution ctbs,
unsigned int  ctbs_len,
LSF_scanContributionRtn  ctb_rtn,
void *  ctb_ctx
 

Scans through the input LSF contributions processing each contribution.

Parameters:
ctbs The first of a series of LSF contributions
ctbs_len The length, in 32-bit words, of all the contributions
ctb_rtn The contribution level handling routine
ctb_ctx The context parameter for ctb_rtn

unsigned int LSF_scanDatagram const LSF_datagram dgm,
LSF_scanContributionRtn  ctb_rtn,
void *  ctb_ctx
 

Scans through the input LSF datagram.

Returns:
The return value of LSF_scanContributions, really the return value of the ctb_handler.
Parameters:
dgm The datagram to scan
ctb_rtn The contribution level handling routine for this datagram.
ctb_ctx The context parameter for ctb_rtn.

unsigned int LSF_scanDatagramRoot const LSF_datagram dgm,
LSF_scanContributionRtn  ctb_rtn,
void *  ctb_ctx
 

Scans through the root contributions of input LSF datagram.

Returns:
The return value of LSF_scanContributions, really the return value of the ctb_handler.
Parameters:
dgm The datagram containing the root to scan
ctb_rtn The contribution level handling routine for this datagram.
ctb_ctx The context parameter for ctb_rtn.

unsigned int LSF_scanDatagrams const LSF_datagram dgms,
unsigned int  dgms_len,
LSF_scanDatagramRtn  dgm_rtn,
void *  dgm_ctx
 

Scans through the input set of LSF datagrams.

Parameters:
dgms The first of a series of LSF datagrams
dgms_len The length, in bytes, of all the datagrams
dgm_rtn The datagram handling routine
dgm_ctx Context parameter for dgm_rtn

unsigned int LSF_scanRecords const LSF_record recs,
unsigned int  recs_len,
LSF_scanRecordRtn  rec_rtn,
void *  rec_ctx
 

Loops through the set of LSF records.

Return values:
0,if all records where processed
!=0,if the scan was aborted.
Parameters:
recs The list of records to scan
recs_len The length, in 32-bit units of all the records
rec_rtn The record level handling routine
rec_ctx The context parameter.for rec_rtn


Generated on Thu Feb 23 22:37:36 2006 by  doxygen 1.4.4