GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > edsd / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

EDSD_print.h File Reference

Printing of demonstration and test routines. More...

#include <EDS/EDS_fw.h>
#include <EDS/LCBV.h>

Typedefs

typedef enum _EDSD_PRINT_K EDSD_PRINT_K
 Typedef for enum _EDSD_PRINT_K.
typedef enum _EDSD_PRINT_V EDSD_PRINT_V
 Typedef for enum _EDSD_PRINT_V.
typedef enum _EDSD_PRINT_M EDSD_PRINT_M
 Typedef for enum _EDSD_PRINT_M.

Enumerations

enum  _EDSD_PRINT_K {
  EDSD_PRINT_K_RAW = 0,
  EDSD_PRINT_K_DIR = 1,
  EDSD_PRINT_K_HDR = 2,
  EDSD_PRINT_K_MC = 3,
  EDSD_PRINT_K_GEM = 4,
  EDSD_PRINT_K_ACD = 5,
  EDSD_PRINT_K_ACDP = 6,
  EDSD_PRINT_K_RSVD7 = 7,
  EDSD_PRINT_K_uTKR = 8,
  EDSD_PRINT_K_UTKR = 9,
  EDSD_PRINT_K_tTKR = 10,
  EDSD_PRINT_K_TTKR = 11,
  EDSD_PRINT_K_cCAL = 12,
  EDSD_PRINT_K_MCAL = 13,
  EDSD_PRINT_K_eCAL = 14,
  EDSD_PRINT_K_ECAL = 15,
  EDSD_PRINT_K_DGN = 16,
  EDSD_PRINT_K_rERR = 17,
  EDSD_PRINT_K_fERR = 18,
  EDSD_PRINT_K_CNT = 19,
  EDSD_PRINT_K_ON_ERR = 31
}
 Enumerates what to print. More...
enum  _EDSD_PRINT_V {
  EDSD_PRINT_V_RAW = EDSD_PRINT_K_RAW,
  EDSD_PRINT_V_DIR = EDSD_PRINT_K_DIR,
  EDSD_PRINT_V_HDR = EDSD_PRINT_K_HDR,
  EDSD_PRINT_V_MC = EDSD_PRINT_K_MC,
  EDSD_PRINT_V_ACD = EDSD_PRINT_K_ACD,
  EDSD_PRINT_V_ACDP = EDSD_PRINT_K_ACDP,
  EDSD_PRINT_V_GEM = EDSD_PRINT_K_GEM,
  EDSD_PRINT_V_RSVD7 = EDSD_PRINT_K_RSVD7,
  EDSD_PRINT_V_uTKR = EDSD_PRINT_K_uTKR,
  EDSD_PRINT_V_UTKR = EDSD_PRINT_K_UTKR,
  EDSD_PRINT_V_tTKR = EDSD_PRINT_K_tTKR,
  EDSD_PRINT_V_TTKR = EDSD_PRINT_K_TTKR,
  EDSD_PRINT_V_cCAL = EDSD_PRINT_K_cCAL,
  EDSD_PRINT_V_MCAL = EDSD_PRINT_K_MCAL,
  EDSD_PRINT_V_eCAL = EDSD_PRINT_K_eCAL,
  EDSD_PRINT_V_ECAL = EDSD_PRINT_K_ECAL,
  EDSD_PRINT_V_DGN = EDSD_PRINT_K_DGN,
  EDSD_PRINT_V_rERR = EDSD_PRINT_K_rERR,
  EDSD_PRINT_V_fERR = EDSD_PRINT_K_fERR,
  EDSD_PRINT_V_ON_ERR = EDSD_PRINT_K_ON_ERR
}
 Enumerates the bit positions of the print objects. More...
enum  _EDSD_PRINT_M {
  EDSD_PRINT_M_RAW = (1 << EDSD_PRINT_V_RAW ),
  EDSD_PRINT_M_DIR = (1 << EDSD_PRINT_V_DIR ),
  EDSD_PRINT_M_HDR = (1 << EDSD_PRINT_V_HDR ),
  EDSD_PRINT_M_MC = (1 << EDSD_PRINT_V_MC ),
  EDSD_PRINT_M_ACD = (1 << EDSD_PRINT_V_ACD ),
  EDSD_PRINT_M_ACDP = (1 << EDSD_PRINT_V_ACDP),
  EDSD_PRINT_M_GEM = (1 << EDSD_PRINT_V_GEM ),
  EDSD_PRINT_M_RSVD7 = (1 << EDSD_PRINT_V_RSVD7),
  EDSD_PRINT_M_uTKR = (1 << EDSD_PRINT_V_uTKR),
  EDSD_PRINT_M_UTKR = (1 << EDSD_PRINT_V_UTKR),
  EDSD_PRINT_M_tTKR = (1 << EDSD_PRINT_V_tTKR),
  EDSD_PRINT_M_TTKR = (1 << EDSD_PRINT_V_TTKR),
  EDSD_PRINT_M_TKR,
  EDSD_PRINT_M_cCAL = (1 << EDSD_PRINT_V_cCAL),
  EDSD_PRINT_M_MCAL = (1 << EDSD_PRINT_V_MCAL),
  EDSD_PRINT_M_eCAL = (1 << EDSD_PRINT_V_eCAL),
  EDSD_PRINT_M_ECAL = (1 << EDSD_PRINT_V_ECAL),
  EDSD_PRINT_M_CAL,
  EDSD_PRINT_M_DGN = (1 << EDSD_PRINT_V_DGN),
  EDSD_PRINT_M_rERR = (1 << EDSD_PRINT_V_rERR),
  EDSD_PRINT_M_fERR = (1 << EDSD_PRINT_V_fERR),
  EDSD_PRINT_M_ERR,
  EDSD_PRINT_M_ALL = (1 << EDSD_PRINT_K_CNT) - 1,
  EDSD_PRINT_M_ON_ERR = (1 << EDSD_PRINT_V_ON_ERR)
}
 Enumerates the bit masks of the print objects. More...

Functions

int EDSD_printSizeof (void)
 Returns the size, in bytes, of the control structure.
int EDSD_printConstruct (EDSD_printCtl *ctl, unsigned int what)
 Allocates and initializes the unpacking buffers.
unsigned int EDSD_printProcess (EDSD_printCtl *ctl, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb)
 Loops through the events, printing the contents to stdout.
void EDSD_printReport (const EDSD_printCtl *ctl)
 The reporting function.
int EDSD_printDestruct (EDSD_printCtl *ctl)
 DeAllocates and the unpacking buffers.
unsigned int EDSD_printObjectsGet (const EDSD_printCtl *ctl)
 Accessor function to return the list of EDS_fw objects.
unsigned int EDSD_printNeedsGet (const EDSD_printCtl *ctl)
 Accessor function to return the scheduling needs.


Detailed Description

Printing of demonstration and test routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EDSD_print.h,v 1.7 2011/03/25 22:16:55 russell Exp $

This consists of a unpacking demonstration and test routines.

Enumeration Type Documentation

Enumerates what to print.

Enumerator:
EDSD_PRINT_K_RAW  ID for the RAW dump
EDSD_PRINT_K_DIR  ID for the Directory dump
EDSD_PRINT_K_HDR  ID for the header, as is
EDSD_PRINT_K_MC  ID for the header, as MC info
EDSD_PRINT_K_GEM  ID for the GEM
EDSD_PRINT_K_ACD  ID for the ACD
EDSD_PRINT_K_ACDP  ID for the ACD primitive unpack
EDSD_PRINT_K_RSVD7  Reserved
EDSD_PRINT_K_uTKR  ID for TKR Uncorrected strip
EDSD_PRINT_K_UTKR  ID for TKR corrected strip
EDSD_PRINT_K_tTKR  ID for TKR uncorrected cluster
EDSD_PRINT_K_TTKR  ID for TKR corrected strip
EDSD_PRINT_K_cCAL  ID for the RAW CAL dump
EDSD_PRINT_K_MCAL  ID for CAL address map
EDSD_PRINT_K_eCAL  ID for CAL energy summary
EDSD_PRINT_K_ECAL  ID for CAL energy dump
EDSD_PRINT_K_DGN  ID for DIAGNOSTIC dump
EDSD_PRINT_K_rERR  ID for RAW ERROR dump
EDSD_PRINT_K_fERR  ID for FORMATTED ERROR dump
EDSD_PRINT_K_CNT  Count of options
EDSD_PRINT_K_ON_ERR  Print only on error

Enumerates the bit masks of the print objects.

Enumerator:
EDSD_PRINT_M_RAW  Mask for the RAW
EDSD_PRINT_M_DIR  Mask for the DIR
EDSD_PRINT_M_HDR  Mask for the HDR
EDSD_PRINT_M_MC  Mask for the MC
EDSD_PRINT_M_ACD  Mask for the ACD
EDSD_PRINT_M_ACDP  Mask for the ACDP
EDSD_PRINT_M_GEM  Mask for the GEM
EDSD_PRINT_M_RSVD7  Reserved
EDSD_PRINT_M_uTKR  Mask for TKR, Uncorrected strip
EDSD_PRINT_M_UTKR  Mask for TKR, corrected strip
EDSD_PRINT_M_tTKR  Mask for TKR, uncorrected cluster
EDSD_PRINT_M_TTKR  Mask for TKR, corrected cluster
EDSD_PRINT_M_TKR  Summary mask indicating any TKR display active
EDSD_PRINT_M_cCAL  Mask for the RAW CAL
EDSD_PRINT_M_MCAL  Mask for CAL, address map
EDSD_PRINT_M_eCAL  Mask for CAL, energy summary
EDSD_PRINT_M_ECAL  Mask for CAL, energy dump
EDSD_PRINT_M_CAL  Summary mask indicating any CAL display active
EDSD_PRINT_M_DGN  Mask for DGN dump
EDSD_PRINT_M_rERR  Mask for rERR dump
EDSD_PRINT_M_fERR  Mask for rERR dump
EDSD_PRINT_M_ERR  Summary mask for any ERR dump
EDSD_PRINT_M_ALL  Print all
EDSD_PRINT_M_ON_ERR  Print only on errror

Enumerates the bit positions of the print objects.

Enumerator:
EDSD_PRINT_V_RAW  Bit offset for the RAW dump
EDSD_PRINT_V_DIR  Bit offset for the DIR dump
EDSD_PRINT_V_HDR  Bit offset for the HDR dump
EDSD_PRINT_V_MC  Bit offset for the MC dump
EDSD_PRINT_V_ACD  Bit offset for the ACD
EDSD_PRINT_V_ACDP  Bit offset for the ACDP
EDSD_PRINT_V_GEM  Bit offset for the GEM
EDSD_PRINT_V_RSVD7  Reserved
EDSD_PRINT_V_uTKR  Bit offset for TKR, hncorrected strip
EDSD_PRINT_V_UTKR  Bit offset for TKR, corrected strip
EDSD_PRINT_V_tTKR  Bit offset for TKR uncorrected cluster
EDSD_PRINT_V_TTKR  Bit offset for TKR, corrected cluster
EDSD_PRINT_V_cCAL  Bit offset for RAW CAL dump
EDSD_PRINT_V_MCAL  Bit offset for CAL map
EDSD_PRINT_V_eCAL  Bit offset for CAL energy summary
EDSD_PRINT_V_ECAL  Bit offset for CAL energy dump
EDSD_PRINT_V_DGN  Bit offset for DGN dump
EDSD_PRINT_V_rERR  Bit offset for rERR dump
EDSD_PRINT_V_fERR  Bit offset for rERR dump
EDSD_PRINT_V_ON_ERR  Print only on error


Function Documentation

int EDSD_printConstruct ( EDSD_printCtl ctl,
unsigned int  what 
)

Allocates and initializes the unpacking buffers.

Returns:
Status
Parameters:
ctl Pointer to the control buffer
what Bit mask of what to print, see _EDSD_PRINT_M

References _EDSD_printCtl::idx, _EDSD_printCtl::in_err, _EDSD_printCtl::left, _EDSD_printCtl::needs, needsGet(), _EDSD_printCtl::objects, objectsGet(), _EDSD_printCtl::sequence, and _EDSD_printCtl::what.

int EDSD_printDestruct ( EDSD_printCtl ctl  ) 

DeAllocates and the unpacking buffers.

Returns:
Status
Parameters:
ctl Pointer to the control buffer

unsigned int EDSD_printNeedsGet ( const EDSD_printCtl ctl  ) 

Accessor function to return the scheduling needs.

Returns:
A bit mask of the scheduling needs
Parameters:
ctl The print control structure

References _EDSD_printCtl::needs.

unsigned int EDSD_printObjectsGet ( const EDSD_printCtl ctl  ) 

Accessor function to return the list of EDS_fw objects.

Returns:
A bit mask of the objects
Parameters:
ctl The print control structure

References _EDSD_printCtl::objects.

unsigned int EDSD_printProcess ( EDSD_printCtl ctl,
unsigned int  pktBytes,
EBF_pkt *  pkt,
EBF_siv  siv,
EDS_fwIxb *  ixb 
)

Loops through the events, printing the contents to stdout.

Parameters:
ctl Control structure dictating how many and what to print
pktBytes The number of bytes in the packet
pkt The packet to process
siv The state information vector
ixb The information exchange block

References check(), checkForErrs(), EDSD_PRINT_M_ACD, EDSD_PRINT_M_ACDP, EDSD_PRINT_M_CAL, EDSD_PRINT_M_DGN, EDSD_PRINT_M_DIR, EDSD_PRINT_M_ERR, EDSD_PRINT_M_GEM, EDSD_PRINT_M_MC, EDSD_PRINT_M_RAW, EDSD_PRINT_M_TKR, _EDSD_printCtl::evt, _EDSD_printCtl::idx, _EDSD_printCtl::in_err, printFull(), printRaw(), and _EDSD_printCtl::what.

void EDSD_printReport ( const EDSD_printCtl ctl  ) 

The reporting function.

Parameters:
ctl The control parameters

int EDSD_printSizeof ( void   ) 

Returns the size, in bytes, of the control structure.

Returns:
The size, in bytes, of the control structure


Generated on Fri Dec 9 16:45:04 2011 by  doxygen 1.5.8