GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> XFC / V0-3-1 > gxfc / rhel5-64
#include <EDS/TMR.h>
#include <EDS/EDS_fwServices.h>
#include <EDS/LCBV.h>
#include <EDS/io/EBF_stream.h>
#include <EDS/io/LCBP.h>
Classes | |
struct | _XfcFilterHandle |
Typedefs | |
typedef void *(* | XfcCfgGetRtn )(void *ftx) |
typedef int(* | XfcResultsPrintRtn )(unsigned int options, const void *beg, const void *end) |
typedef void(* | XfcStatsAccumulateRtn )(void *stats, const void *beg, const void *end) |
typedef void(* | XfcStatsPrintRtn )(void *cfg, void *stats, unsigned int vetoes) |
typedef void(* | XfcStatsClearRtn )(void *stats) |
typedef struct _XfcFilterHandle | XfcFilterHandle |
Functions | |
int | xfc_initialize (void) |
One time initialization routine. | |
int | xfc_process (int id, const XfcRto *rto, const EDS_DB_HandlerConstructServices *services) |
Common routine to do the processing. | |
int | xfc_sizeof (XfcConstructCtx *ctx, const EFC_definition *def, const EFC_DB_Schema *schema, int stats_size) |
Computes the size needed to hold configuration defined by the specified context, definition block and schema. | |
const EDS_fwHandlerServicesX1 * | xfc_construct (XfcConstructCtx *ctx, EFC *efc, unsigned int handler_id, const EFC_DB_Schema *schema, unsigned int schema_key, EDS_fw *edsFw, unsigned int objects, unsigned int needs, XfcResultsPrintRtn resultsPrint, XfcStatsClearRtn statsClear, XfcStatsAccumulateRtn statsAcc, XfcStatsPrintRtn statsPrint, void *statsPrintCtx) |
Constructs the configuration for the specified set of parameters. | |
void | xfc_display (XfcCtx *ctx, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb) |
Displays the requested subsystems. | |
int | xfc_any_display (const XfcCtx *ctx) |
Returns non-zero if there are any subsystems to display that need a directory. | |
void | xfc_begtick_set (XfcCtx *ctx, TMR_tick tick) |
Seeds the beginning tick of this sample. | |
void | xfc_endtick_set (XfcCtx *ctx, TMR_tick tick) |
Seeds the ending tick of this sample. | |
void * | xfc_filterCtx_get (const XfcCtx *ctx) |
Returns a pointer to the underlying user filter control structure. | |
void * | xfc_resultsCtx_get (const XfcCtx *ctx) |
Returns a pointer to the results control structure. | |
void * | xfc_statsCtx_get (const XfcCtx *ctx) |
Returns a pointer to the statistics control structure. | |
void | xfc_results_post (XfcCtx *ctx, int reason, const void *beg, const void *end, const EFA_span *span) |
Dummy result vector post routine. | |
int | xfc_results_start (XfcCtx *ctx, int reason, int run_id, int startTime, int mode) |
Handles the start run for the result analysis. | |
void | xfc_results_print (XfcCtx *ctx, const void *beg, const void *end) |
Prints the standard part of the results, then calls the filter specific piece. | |
unsigned int | xfc_objects_get (const XfcCtx *ctx) |
Used to supply any additional EDS_fw objects needed by this filter context. | |
unsigned int | xfc_needs_get (const XfcCtx *ctx) |
Used to supply any additional EDS_fw needs for this filter context. |
CVS $Id: xfc.h,v 1.2 2011/03/28 20:51:00 russell Exp $
int xfc_any_display | ( | const XfcCtx * | ctx | ) |
Returns non-zero if there are any subsystems to display that need a directory.
ctx | The filter context parameter |
References _XfcCtx::displayer, and _XfcDisplayerCtx::printCtl.
void xfc_begtick_set | ( | XfcCtx * | ctx, | |
TMR_tick | tick | |||
) |
Seeds the beginning tick of this sample.
ctx | The xfc context | |
tick | The beginning tick value |
References _XfcCtx::tickBeg.
Referenced by xfc_results_post().
const EDS_fwHandlerServices xfc_construct | ( | XfcConstructCtx * | ctxx, | |
EFC * | efc, | |||
unsigned int | handler_id, | |||
const EFC_DB_Schema * | schema, | |||
unsigned int | schema_key, | |||
EDS_fw * | edsFw, | |||
unsigned int | objects, | |||
unsigned int | needs, | |||
XfcResultsPrintRtn | resultsPrint, | |||
XfcStatsClearRtn | statsClear, | |||
XfcStatsAccumulateRtn | statsAcc, | |||
XfcStatsPrintRtn | statsPrint, | |||
void * | statsPrintCtx | |||
) |
Constructs the configuration for the specified set of parameters.
ctxx | Holds the run-time modifying context | |
efc | The controlling Event Filter's handle | |
handler_id | The handler's identifier | |
schema | The defining schema. This must be what was passed to xfc_sizeof (). | |
schema_key | The (likely FMX) key of the schema | |
edsFw | The controlling EDS framework's handle | |
objects | The EDS framework objects needed by this filter | |
needs | The EDS framework service needs of this filter | |
resultsPrint | The filter specific result print routine | |
statsClear | The filter specific statistics buffer clear routine | |
statsAcc | The filter specific statistics accumulation routine | |
statsPrint | The fitler specific statistics print routine | |
statsPrintCtx | The filter specific statistics print routine context parameter |
!!!results;
References _XfcStatsCtx::acc, _XfcStatsCtx::bufs, _XfcSdi::cbp, _XfcStatsCtx::clear, _XfcConstructCtx::ctx, _XfcHandlerCtx::def, _XfcCtx::displayer, _XfcHandlerCtx::efa_post_cnt, _XfcHandlerCtx::efa_size, _XfcHandlerCtx::efc_size, _XfcCtx::efcCtx, _XfcResultsCtx::efs, _XfcHandlerCtx::efs_size, _XfcSdi::file, _XfcEfcCtx::filterCtx, _XfcCtx::handler, _XfcCtx::nevts, _XfcCtx::poster, _XfcResultsCtx::print, _XfcStatsCtx::print, _XfcDisplayerCtx::print_size, _XfcDisplayerCtx::printCtl, _XfcStatsCtx::printCtx, _XfcHandlerCtx::results, _XfcEfcCtx::resultsCtx, _XfcPosterCtx::sdi, _XfcResultsCtx::size, _XfcStatsCtx::size, _XfcDisplayerCtx::ss_to_print, _XfcHandlerCtx::stats, _XfcEfcCtx::statsCtx, xfc_needs_get(), xfc_objects_get(), xfc_results_post(), and xfc_results_start().
void void xfc_display | ( | XfcCtx * | ctx, | |
unsigned int | pktBytes, | |||
EBF_pkt * | pkt, | |||
EBF_siv | siv, | |||
EDS_fwIxb * | ixb | |||
) |
Displays the requested subsystems.
ctx | The filter context | |
pktBytes | The number of bytes in the packet | |
pkt | The event data packet | |
siv | The packet state information vector | |
ixb | The EDS information exchange block |
References _XfcCtx::displayer, _XfcDisplayerCtx::printCtl, _XfcDisplayerCtx::ss_to_display, _XfcDisplayerCtx::ss_to_print, and _XfcDisplayerCtx::to_print.
void xfc_endtick_set | ( | XfcCtx * | ctx, | |
TMR_tick | tick | |||
) |
Seeds the ending tick of this sample.
ctx | The xfc context | |
tick | The ending tick value |
References _XfcCtx::tickEnd.
Referenced by xfc_results_post().
void * xfc_filterCtx_get | ( | const XfcCtx * | ctx | ) |
Returns a pointer to the underlying user filter control structure.
ctx | The filter control context |
References _XfcCtx::efcCtx, and _XfcEfcCtx::filterCtx.
int xfc_initialize | ( | void | ) |
One time initialization routine.
unsigned int xfc_needs_get | ( | const XfcCtx * | ctx | ) |
Used to supply any additional EDS_fw needs for this filter context.
ctx | The filter context handle |
References _XfcPosterCtx::ctx, _XfcCtx::displayer, _XfcCtx::poster, and _XfcDisplayerCtx::printCtl.
Referenced by xfc_construct().
unsigned int xfc_objects_get | ( | const XfcCtx * | ctx | ) |
Used to supply any additional EDS_fw objects needed by this filter context.
ctx | The filter context handle |
References _XfcPosterCtx::ctx, _XfcCtx::displayer, _XfcCtx::poster, and _XfcDisplayerCtx::printCtl.
Referenced by xfc_construct().
int xfc_process | ( | int | id, | |
const XfcRto * | rto, | |||
const EDS_DB_HandlerConstructServices * | services | |||
) |
Common routine to do the processing.
id | The EFC_DB_id of this filter | |
rto | The runtime options structure | |
services | An alternative set of construction services, may be NULL, in which case the services resolved by the database schema and instance buried in the rto will be used. |
References _XfcHandlerCtx::construction_services, _XfcCtx::ebf, _XfcCtx::edsFw, _XfcHandlerCtx::efc, _XfcCtx::handler, _XfcHandlerCtx::handler_id, _XfcRto::mode, _XfcCtx::mode, _XfcCtx::poster, _XfcPosterCtx::sdi, xfc_display_build(), xfc_edsFw_build(), xfc_istream_build(), xfc_run_start(), xfc_run_stop(), and xfc_time_initialize().
void xfc_results_post | ( | XfcCtx * | ctx, | |
int | reason, | |||
const void * | beg, | |||
const void * | end, | |||
const EFA_span * | span | |||
) |
Dummy result vector post routine.
ctx | The xfc context | |
reason | The posting reason | |
beg | The first result vector | |
end | The last result vector (actually one past the last one) | |
span | The span of the sample |
References _XfcStatsCtx::acc, _XfcStatsCtx::bufs, _XfcResultsCtx::efs, _XfcCtx::handler, _XfcResultsCtx::options, _XfcStatsCtx::print, _XfcStatsCtx::printCtx, _XfcHandlerCtx::results, _XfcHandlerCtx::stats, _XfcResultsCtx::verbose, _XfcResultsCtx::vetoes, xfc_begtick_set(), xfc_endtick_set(), and xfc_results_print().
Referenced by xfc_construct().
void xfc_results_print | ( | XfcCtx * | ctx, | |
const void * | beg, | |||
const void * | end | |||
) |
Prints the standard part of the results, then calls the filter specific piece.
ctx | The xfc context | |
beg | Pointer to the first filter specific result vector | |
end | Pointer to the last filter specific result vector |
References _XfcCtx::handler, _XfcResultsCtx::options, _XfcResultsCtx::print, printElapsed(), _XfcHandlerCtx::results, _XfcCtx::tickBeg, and _XfcCtx::tickEnd.
Referenced by xfc_results_post().
int xfc_results_start | ( | XfcCtx * | ctx, | |
int | reason, | |||
int | run_id, | |||
int | startTime, | |||
int | mode | |||
) |
Handles the start run for the result analysis.
==0,if | successfully started | |
!=0,if | not successfully started |
ctx | The callback context parameter | |
reason | The LSF_REASON_OPEN to indicate why the stream is being started | |
run_id | Suggested use is to identify the block of events between when EDS_fwHandlerStart is called and EDS_fwHandlerFlush is called with a stop reason | |
startTime | The run start time rounded to the nearest second | |
mode | This must be the running mode. |
References _XfcResultsCtx::efs, _XfcCtx::handler, and _XfcHandlerCtx::results.
Referenced by xfc_construct().
void * xfc_resultsCtx_get | ( | const XfcCtx * | ctx | ) |
Returns a pointer to the results control structure.
ctx | The filter control context |
References _XfcCtx::efcCtx, and _XfcEfcCtx::resultsCtx.
int xfc_sizeof | ( | XfcConstructCtx * | ctxx, | |
const EFC_definition * | def, | |||
const EFC_DB_Schema * | schema, | |||
int | stats_size | |||
) |
Computes the size needed to hold configuration defined by the specified context, definition block and schema.
ctxx | The filter control construction context | |
def | The EFC definition block | |
schema | The defining schema | |
stats_size | The size, in bytes, of one statistics buffer |
References _XfcConstructCtx::ctx, _XfcHandlerCtx::def, _XfcCtx::displayer, _XfcHandlerCtx::efa_post_cnt, _XfcHandlerCtx::efa_size, _XfcHandlerCtx::efc_size, _XfcHandlerCtx::efs_size, _XfcSdi::file, _XfcCtx::handler, _XfcCtx::poster, _XfcDisplayerCtx::print_size, RND8, _XfcHandlerCtx::schema, _XfcPosterCtx::sdi, _XfcStatsCtx::size, _XfcDisplayerCtx::ss_to_print, and _XfcHandlerCtx::stats.
void * xfc_statsCtx_get | ( | const XfcCtx * | ctx | ) |
Returns a pointer to the statistics control structure.
ctx | The filter control context |
References _XfcCtx::efcCtx, and _XfcEfcCtx::statsCtx.