GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> XFC / dev > gxfc / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

xfc_ebf_output.c File Reference

Writes an EBF file. More...

#include <EDS/io/EBF_stream.h>
#include <EDS/EBF_pkt.h>
#include <EDS/EBF_ctb.h>
#include <EDS/EBF_evt.h>
#include <EDS/EBF_ebw.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_cid.h>
#include <EDS/EDS_fw.h>
#include <PBI/FFS.ih>
#include <string.h>
#include <errno.h>
#include <stdio.h>

Classes

struct  _XfcEbfOutputCtx
 EBF output stream context. More...
struct  _RestartPkt
 Defines an EBF restart packet. More...

Typedefs

typedef struct _XfcEbfOutputCtx XfcEbfOutputCtx
 Typedef for _XfcEbfOutputCtx.
typedef struct _RestartPkt RestartPkt
 Typedef for struct _RestartPkt.

Functions

static int streamStart (XfcEbfOutputCtx *ctx, unsigned int run_id, unsigned int startTime, unsigned int mode, int reason)
 Stream start routine.
static void streamWrite (XfcEbfOutputCtx *ctx, EDS_fwIxb *ixb)
 Routine to flush an output stream.
static int streamNotify (XfcEbfOutputCtx *ctx, unsigned int mode, unsigned int active, const unsigned char cfgs[32], const EDS_rsdTbl *rsdTbl)
 Routine to handle mode change notifications to the output stream.
static void streamFlush (XfcEbfOutputCtx *ctx, int reason)
 Routine to flush an output stream.
static __inline unsigned int restart_construct (RestartPkt *restart, const EBF_evt *evt)
 Constructs a template of the packet restart header. This includes both the 8 word header and the 4 word restart cell.
int xfc_ebf_output_sizeof (const char *name, unsigned int options)
 Returns the size, in bytes, of the EBF output context handle.
const EDS_fwPostServices * xfc_ebf_output_construct (XfcEbfOutputCtx *ctx, const char *name, unsigned int options)
 Constructs the output services.


Detailed Description

Writes an EBF file.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: xfc_ebf_output.c,v 1.2 2011/03/28 20:51:00 russell Exp $

Function Documentation

static __inline unsigned int restart_construct ( RestartPkt restart,
const EBF_evt *  evt 
) [static]

Constructs a template of the packet restart header. This includes both the 8 word header and the 4 word restart cell.

Returns:
Template copy of the Event Builder Word
Parameters:
restart The target restart packet
evt The event to derive the information from

References _RestartPkt::cell, and _RestartPkt::hdr.

Referenced by streamWrite().

static void streamFlush ( XfcEbfOutputCtx ctx,
int  reason 
) [static]

Routine to flush an output stream.

Parameters:
ctx The user context parameter
reason The reason flush is being called

References _XfcEbfOutputCtx::stream.

Referenced by xfc_ebf_output_construct().

static int streamNotify ( XfcEbfOutputCtx ctx,
unsigned int  mode,
unsigned int  active,
const unsigned char  cfgs[32],
const EDS_rsdTbl *  rsdTbl 
) [static]

Routine to handle mode change notifications to the output stream.

Parameters:
ctx The user context parameter
mode The current mode
active The list of active handlers
cfgs The array of handler configurations
rsdTbl The result summary data table

Referenced by xfc_ebf_output_construct().

static int streamStart ( XfcEbfOutputCtx ctx,
unsigned int  run_id,
unsigned int  startTime,
unsigned int  mode,
int  reason 
) [static]

Stream start routine.

Parameters:
ctx The Xfc EBF output context
run_id The run identifier
startTime The start time (in seconds since the SA epoch)
mode The starting mode
reason The reason for starting

Referenced by xfc_ebf_output_construct().

static void streamWrite ( XfcEbfOutputCtx ctx,
EDS_fwIxb *  ixb 
) [static]

Routine to flush an output stream.

Parameters:
ctx The output context handle
ixb The information exchange block

References restart_construct(), and _XfcEbfOutputCtx::stream.

Referenced by xfc_ebf_output_construct().

const EDS_fwPostServices* xfc_ebf_output_construct ( XfcEbfOutputCtx ctx,
const char *  name,
unsigned int  options 
)

Constructs the output services.

Returns:
The EDS post services vector
Parameters:
ctx The context block
name The name of the output file to construct
options Additional options

References _XfcEbfOutputCtx::options, _XfcEbfOutputCtx::stream, streamFlush(), streamNotify(), streamStart(), and streamWrite().

Referenced by createPoster().

int xfc_ebf_output_sizeof ( const char *  name,
unsigned int  options 
)

Returns the size, in bytes, of the EBF output context handle.

Returns:
The size, in bytes, of the EBF output context handle
Parameters:
name The name of the output file to construct
options Additional options

Referenced by createPoster().


Generated on Mon Aug 8 10:34:02 2011 by  doxygen 1.5.8