GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-10-2 > eds / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

EBF_match.h File Reference

Interface to the EBW and ESW contributor header word matching. More...

#include "EDS/EBF_esw.h"
#include "EDS/EBF_ebw.h"

Defines

#define EBF_MATCH_M_EBW_EXPECTED(_latp_node)   EBF_MATCH_M_EBW_STATIC_EXPECTED | (_latp_node << EBF_EBW_V_DST)
 Defines the values for the expected values of the static fields of the EBW plus the LAT node number field.
#define EBF_MATCH_SET_K_LATP_NODE_ASIS   (-1)
 Sentinel value to EBF_matchSet indicating to leave the LATp node number as is.
#define EBF_MATCH_SET_K_DGN_IDS_ASIS   (-1)
 Sentinel value to EBF_matchSet indicating to leave the diagnostic bit mask as is.
#define EBF_MATCH_SET_K_CIDS_ASIS   ( 0)
 Sentinal value to EBF_matchSet indicating to leave the contributor bit mask as is.
#define EBF_MATCH_SET_K_ORDER_ASIS   ((const signed char *)0)
 Sentinel value to EBF_matchSet indicating to leave the diagnostic bit mask as is.

Typedefs

typedef enum _EBF_MATCH_M EBF_MATCH_M
 Typedef for enum _EBF_MATCH_M.

Enumerations

enum  _EBF_MATCH_M {
  EBF_MATCH_M_EBW_STATIC,
  EBF_MATCH_M_EBW_EXTERNAL,
  EBF_MATCH_M_EBW_INTERNAL = ( EBF_EBW_M_PARITY),
  EBF_MATCH_M_EBW_ALL,
  EBF_MATCH_M_EBW_STATIC_EXPECTED,
  EBF_MATCH_M_EBW_ERRORS = ( EBF_MATCH_M_EBW_ALL ),
  EBF_MATCH_M_EBW_EXCEPTIONS = ( 0 ),
  EBF_MATCH_M_ESW_STATIC,
  EBF_MATCH_M_ESW_EXTERNAL = 0,
  EBF_MATCH_M_ESW_INTERNAL,
  EBF_MATCH_M_ESW_ALL,
  EBF_MATCH_M_ESW_STATIC_EXPECTED,
  EBF_MATCH_M_ESW_ERRORS = ( EBF_MATCH_M_ESW_ALL & ~EBF_ESW_M_ERRBLK),
  EBF_MATCH_M_ESW_EXCEPTIONS = ( EBF_ESW_M_ERRBLK)
}
 Bit masks that detail the nature of matching criteria of the fields within the ESW. More...

Functions

int EBF_matchSet (unsigned int latp_node, unsigned int dgn_ids, unsigned int cids, const signed char order[32])
 Sets the values of the expected readout parameters.


Detailed Description

Interface to the EBW and ESW contributor header word matching.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: EBF_match.h,v 1.4 2009/04/29 17:30:16 russell Exp $

Typedef Documentation

EBF_MATCH_M

Typedef for enum _EBF_MATCH_M.

The value of the matching fields may come either from the template or from values in one of the contributor words. The important point, is that these fields must match in every contributor.
For the ESW, the only field that does not fall immediately into this category is the diagnostic block present field. The reason is that the diagnostic block is solicited on a TEM-by-TEM basis, so it possible that not all the fields will match. However, in practice the usual case will be
  1. all TEMs are set the same. with the likelihood that
  2. all TEMs are set to off.


Enumeration Type Documentation

enum _EBF_MATCH_M

Bit masks that detail the nature of matching criteria of the fields within the ESW.

Enumerator:
EBF_MATCH_M_EBW_STATIC  Mask of the fields in EBM that are statically known See EBF_MATCH_M_EBW_STATIC_EXPECTED for the value of these fields
EBF_MATCH_M_EBW_EXTERNAL  Mask of fields that can be matched against some externally provided value. That is, the value of these fields is fixed at configuration time. By analogy, the values here are fixed at runtime, not compile time
EBF_MATCH_M_EBW_INTERNAL  Bit mask of values that are computable from any of the contributor's EBW word. In this instance, the parity of the LAT Protocol Word is computable from the LAT Protocol Word of each contributor
EBF_MATCH_M_EBW_ALL  Mask of bits that can be matched in each EBW.
EBF_MATCH_M_EBW_STATIC_EXPECTED  Expected value of the static fields.
EBF_MATCH_M_EBW_ERRORS  Mismatches in these fields are considered serious errors
EBF_MATCH_M_EBW_EXCEPTIONS  Mismatches in these fields are considered exceptions
EBF_MATCH_M_ESW_STATIC  Mask of bits that have a static value. See EBF_MATCH_M_ESW_STATIC_EXPECTED for the value of these fields
EBF_MATCH_M_ESW_INTERNAL  Mask of fields that can be matched against some apriori value. That is, the value of these fields is fixed at configuration time. By analogy, the values here are fixed at runtime, not compile time.

01.25.09 jjr set to 0, removing the DGNBLK as a comparison field see comments in the history log

EBF_MATCH_M_ESW_ALL  Mask of bits that can be matched in each ESW. Note that the inclusion of the auxilliary fields demands that the user provide the values of these fields. Practically speaking, the only field in this category is the DIAGNOSTIC BLOCK present field.
EBF_MATCH_M_ESW_STATIC_EXPECTED  Expected value of the static fields. Note that the ERROR BLOCK present field is included. It is possible that this field will be set on some contributors. That is okay. The difference in this field lies in interpretation. For the other fields, mismatches are serious ERRORS.Mismatches in this field should be treated as EXCEPTIONS.
EBF_MATCH_M_ESW_ERRORS  Mismatches in these fields are considered serious errors
EBF_MATCH_M_ESW_EXCEPTIONS  Mismatches in these fields are considered exceptions


Function Documentation

int EBF_matchSet ( unsigned int  latp_node,
unsigned int  dgn_ids,
unsigned int  cids,
const signed char  order[32] 
)

Sets the values of the expected readout parameters.

Return values:
-1 latp_node address is invalid
-2 The list of contributors (cids) either stored away or the one being added, contains references to cids that are not mentioned in the order array.
Parameters:
latp_node This must be a number between 0x20 and 0x3f, although in the anticipated values are more likely to be limited to 0x20, 0x21, 0x22, 0x23, 0x24, 0x25. The check on the LATp destination field is
  • The top bit must be 1
  • All LATp destination field of each contributor must be the same
  • The LATp destination field must be either the value supplied or the broadcast address. To effectively neuter this test supply 0x20, the broadcast address.
dgn_ids A bit mask representing the set of contributors with the diagnostic bit set. The order is MSb is contributor 0. If specified as EBF_MATCH_SET_K_DGN_IDS_ASIS, the current value will not be modified.
cids Bit mask representing the set of contributors. It is considered an error if this decoded set does not exactly match this set. If specified as EBF_MATCH_SET_K_CIDS_ASIS, the current value will not be modified.
order An array of 32 giving the readout order. Contributors not present in the set as specified by cids will be ignored. Specifying it in this way allows one to have a standard ordering array that can be pared down if the set of contributors is not the complete set. If specified as EBF_MATCH_ORDER_ASIS, the current value will not be modified.


Generated on Thu Sep 2 12:25:22 2010 by  doxygen 1.5.3