GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EFC / V4-3-0
Constituent: efc     Tag: mv2304
#include "EFC/EFS.h"
#include "EFC/EFC.h"
#include "EFC/EFA_def.h"
#include "EFC/EFS_ids.h"
#include "EFC/EFS_ctxCtb.h"
#include "EFC_time.ih"
#include "dprintf.h"
#include "EDS/FFS.h"
#include "EDS/EBF_gem.h"
#include "EMP/LSD_sdi.h"
#include "LSE/LSEW_ctxTim.h"
#include "EFC_DB/EFC_DB_schemaAnalysis.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "LSF/LSF_cpu.h"
#include "LSF/LSF_origin.h"
#include "LSF/LSF_reason.h"
#include "LDT/BFP.h"
#include "PBS/PBS.h"
#include "PBS/FPA.h"
#include "PBS/SEM.h"
#include "PBS/FORK.h"
#include <string.h>
Include dependency graph for EFS.c:

Data Structures | |
| struct | _EfsPrvHdr |
| The previous last event header, used as the baseline for encoding the difference. More... | |
| struct | _EFS_stats |
| The statistics counters. More... | |
| struct | _EFS_datagram |
| Maps out the fixed part of an EFS datagram. More... | |
| struct | _EFS |
| The generic Event Filter Statistics utility handle. More... | |
Defines | |
| #define | ROUND(_val) ((((int)(_val)) + 7) & ~(7)) |
| #define | NPACKETS 4 |
| #define | DATAGRAM_VERSION 0 |
| #define | CONTRIBUTION_VERSION 0 |
| #define | EFS_K_APID_BASE 0x3b7 |
Typedefs | |
| typedef _EfsPrvHdr | EfsPrvHdr |
| Typedef for struct _EfsPrvHdr. | |
| typedef _EFS_stats | EFS_stats |
| Typedef for struct _EFS_stats. | |
| typedef _EFS_datagram | EFS_datagram |
| Typedef for struct EFS_datagram. | |
| typedef _EFS | EFS |
| Typedef for struct _EFS. | |
Functions | |
| static unsigned int | sbsKeyGet (void) |
| Retrieves the secondary boot script key. | |
| static int | get_datagram_size (int max_records) |
| Computes, in bytes, the maximal size of a datagram of max_records. | |
| static int | get_datagram_pool_size (int max_records) |
| Calculates the size in bytes of the ring buffer pool size from which the datagrams will be allocated. | |
| static void | accumulate (EFS_stats *stats, unsigned int stride, const void *beg, const void *end) |
| Accumulates the event statistics for the results from beg to end. | |
| static __inline unsigned int * | copy (unsigned int *dst, const unsigned int *src, int nbytes) |
| Copies the specified number of bytes. | |
| static __inline void | add (unsigned int *dst, const unsigned int *src, int cnt) |
| static unsigned int * | format_hdr (unsigned int *dat, const EFA_hdr *hdr, const EfsPrvHdr *prv) |
| static unsigned int * | format (unsigned int *dat, const unsigned int *buf, int n, unsigned int max) |
| Encodes the input buffer using a significant bit count followed by the significant bits. | |
| static unsigned int * | format_stats (unsigned int *dat, const EFS_stats *stats) |
| Format the statisitics buffer. | |
| static unsigned int * | format_diff_stats (unsigned int *dat, const EFS_stats *cur, const EFS_stats *prv) |
| Format the statisitics buffer as the difference between the current and previous. | |
| static LSF_record * | format_global_record (LSF_record *rec, const EFA_span *span, const EFS_stats *stats) |
| Formats the global statistics record. | |
| static LSF_record * | format_begin_record (LSF_record *rec, const EFA_span *span, const EFS_stats *stats) |
| Formats a normal record with 2 headers. | |
| static LSF_record * | format_record (LSF_record *rec, const EFA_span *span, const EFS_stats *stats) |
| Formats a standard statistics record with one header. | |
| static LSF_record * | format_diff_record (LSF_record *rec, const EfsPrvHdr *prv_hdr, const EFA_span *span, const EFS_stats *cur, const EFS_stats *prv) |
| Formats a standard statistics record. | |
| static __inline void | clear (EFS *efs) |
| Clears the statistics block. | |
| static __inline void | compose_ctx_template (EFS_ctxCtb *ctb, unsigned int sbs, unsigned int schema_key, LSF_CPU_K cpu, LSF_ORIGIN_K origin) |
| Composes the static (one-time fill-in) fields of the context contribution. | |
| unsigned char * | EFS_construct (EFS *efs, const EFC_DB_SchemaAnalysis *schema, int result_size, unsigned int apid_offset, unsigned int dgmid_offset, LSF_CPU_K cpu, LSF_ORIGIN_K origin, unsigned int schema_key, LSD_sdiWriteCbp *write) |
| Constructs an Event Filter Statistics handle. | |
| void | EFS_post (EFS *efs, int reason, const void *beg, const void *end, const EFA_span *span) |
| Formats the datagram and eventually writes the datagram to the output device. | |
| int | EFS_sizeof (int max_records) |
| Computes the size, in bytes, of the EFS control structure. | |
| int | EFS_start (EFS *efs, int reason, int run_id, int startTime, int mode) |
| Captures the start run information. | |
Variables | |
| static const unsigned char | OpenReasons [16] |
| Maps a closing reason into its complimentary open reason. | |
CVS $Id: EFS.c,v 1.5 2007/12/18 01:27:13 russell Exp $
|
||||||||||||||||||||
|
Accumulates the event statistics for the results from beg to end.
|
|
|
Clears the statistics block.
|
|
||||||||||||||||||||||||
|
Composes the static (one-time fill-in) fields of the context contribution.
|
|
||||||||||||||||
|
Copies the specified number of bytes.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Constructs an Event Filter Statistics handle.
|
|
||||||||||||||||||||||||
|
Formats the datagram and eventually writes the datagram to the output device.
|
|
|
Computes the size, in bytes, of the EFS control structure.
|
|
||||||||||||||||||||||||
|
Captures the start run information.
|
|
||||||||||||||||||||
|
Encodes the input buffer using a significant bit count followed by the significant bits.
number of bits in the count of number of significant digits (5)
number of significant digits | significant bits (first + nsig)
number of significant digits | significant bits
number of significant digits | significant bits
.
.
|
|
||||||||||||||||
|
Formats a normal record with 2 headers.
|
|
||||||||||||||||||||||||
|
Formats a standard statistics record.
|
|
||||||||||||||||
|
Format the statisitics buffer as the difference between the current and previous.
|
|
||||||||||||||||
|
Formats the global statistics record.
|
|
||||||||||||||||
|
Formats a standard statistics record with one header.
|
|
||||||||||||
|
Format the statisitics buffer.
|
|
|
Calculates the size in bytes of the ring buffer pool size from which the datagrams will be allocated.
A reasonable number of records would be less than 50. This will give a datagram size of around 17Kbytes. |
|
|
Computes, in bytes, the maximal size of a datagram of max_records.
|
|
|
Retrieves the secondary boot script key.
|
|
|
Initial value:
{
LSF_REASON_OPEN_K_START,
LSF_REASON_OPEN_K_START_OP,
LSF_REASON_OPEN_K_AUTO_TIME,
LSF_REASON_OPEN_K_AUTO_COUNT,
LSF_REASON_OPEN_K_START,
LSF_REASON_OPEN_K_START_OP,
LSF_REASON_OPEN_K_START_AUTO,
LSF_REASON_OPEN_K_START,
LSF_REASON_OPEN_K_RESUME,
LSF_REASON_OPEN_K_RESUME_OP,
LSF_REASON_OPEN_K_RESUME_AUTO,
LSF_REASON_OPEN_K_AUTO,
LSF_REASON_OPEN_K_AUTO_MODE,
LSF_REASON_CLOSE_K_AUTO_TIME,
LSF_REASON_CLOSE_K_AUTO_COUNT,
LSF_REASON_CLOSE_K_AUTO_FULL
}
|
1.4.4