GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-3-1 > qsec_wb / linux-gcc
#include "QSEC_ctx_p.h"
#include <string.h>
#include <stdlib.h>
Functions | |
static void | reportCtxAcd (const QSEC_ctx *ctx, FILE *fp) |
Write a formatted ASCII description of the contents of the context to the file fp. | |
static void | reportCtxCal (const QSEC_ctx *ctx, FILE *fp) |
Write a formatted ASCII description of the contents of the context to the file fp. | |
static void | reportCtxTkr (const QSEC_ctx *ctx, FILE *fp) |
Write a formatted ASCII description of the contents of the context to the file fp. | |
static void | reportCtxGlobal (const QSEC_ctx *ctx, FILE *fp) |
Write a formatted ASCII description of the contents of the context to the file fp. | |
static void | reportCtxSetting (FILE *fp, const char *string, unsigned short value) |
Print out a single context parameter. | |
static void | reportCtxChannel (FILE *fp, const char *string, const QSEC_channel *chan) |
Print out channel information. | |
size_t | QSEC_sizeofCtx (void) |
Return the size of the QSEC context structure. | |
QSEC_ctx * | QSEC_constructCtx (void *buffer) |
Construct a QSEC_ctx structure in the memory provided. | |
QSEC_ctx * | QSEC_allocCtx (void) |
Allocate memory for a QSEC_ctx structure and construct it as such. | |
void | QSEC_destructCtx (QSEC_ctx *ctx) |
Release resources associated with the QSEC_ctx structure. | |
const unsigned int * | QSEC_recoverCtx (QSEC_ctx *ctx, const unsigned int *buf) |
Copy the context information from the buffer. | |
void | QSEC_reportCtx (const QSEC_ctx *ctx, FILE *fp) |
Write a formatted ASCII description of the contents of the context to the file fp. |
QSEC_ctx* QSEC_allocCtx | ( | void | ) |
Allocate memory for a QSEC_ctx structure and construct it as such.
References QSEC_constructCtx(), and QSEC_sizeofCtx().
QSEC_ctx* QSEC_constructCtx | ( | void * | buffer | ) |
Construct a QSEC_ctx structure in the memory provided.
buffer | block of memory to use for the QSEC_ctx structure |
References QSEC_sizeofCtx().
Referenced by QSEC_allocCtx(), and QSEC_construct().
void QSEC_destructCtx | ( | QSEC_ctx * | ctx | ) |
Release resources associated with the QSEC_ctx structure.
ctx | Pointer to a QSEC_ctx structure created using QSEC_allocCtx() |
const unsigned int* QSEC_recoverCtx | ( | QSEC_ctx * | ctx, | |
const unsigned int * | buf | |||
) |
Copy the context information from the buffer.
This routine must be able to deal with previous versions of the context information and fill in any new fields appropriately.
ctx | Pointer to a context structure | |
buf | Pointer to the context data |
References _QSEC_cal_v0::accept, _QSEC_cal::accept, _QSEC_specific_v0::acd, _QSEC_specific::acd, _QSEC_acd_v0::bias_dac, _QSEC_acd::bias_dac, _QSEC_specific_v0::cal, _QSEC_specific::cal, _QSEC_cal::calib_gain, _QSEC_tkr_v0::channel, _QSEC_tkr::channel, _QSEC_cal_v0::channel, _QSEC_cal::channel, _QSEC_acd_v0::channel, _QSEC_acd::channel, _QSEC_cal_v0::first_range, _QSEC_cal::first_range, _QSEC_channel::flags, _QSEC_ctx_v0::global, _QSEC_ctx::global, _QSEC_cal::high_cal_ena, _QSEC_cal_v0::high_energy, _QSEC_cal::high_gain, _QSEC_cal::high_rng_ena, _QSEC_cal::high_thresh, _QSEC_cal::high_trg_ena, _QSEC_acd::hitmap_delay, _QSEC_acd_v0::HLD, _QSEC_acd::HLD, _QSEC_acd_v0::hold_delay, _QSEC_acd::hold_delay, _QSEC_tkr_v0::injection, _QSEC_tkr::injection, _QSEC_cal_v0::injection, _QSEC_cal::injection, _QSEC_acd_v0::injection, _QSEC_acd::injection, _QSEC_global_v0::latc_cfg, _QSEC_global::latc_cfg, _QSEC_global_v0::lci_cfg, _QSEC_global::lci_cfg, _QSEC_cal::low_cal_ena, _QSEC_cal_v0::low_energy, _QSEC_cal::low_gain, _QSEC_cal::low_rng_ena, _QSEC_cal::low_thresh, _QSEC_cal::low_trg_ena, _QSEC_ctx::mode, _QSEC_channel::number, _QSEC_global_v0::one_range, _QSEC_global::one_range, _QSEC_global_v0::period, _QSEC_global::period, _QSEC_acd_v0::PHA, _QSEC_acd::PHA, _QSEC_acd::range, _QSEC_ctx_v0::specific, _QSEC_ctx::specific, _QSEC_tkr::split_high, _QSEC_tkr::split_low, _QSEC_global_v0::strobe, _QSEC_global::strobe, _QSEC_tkr_v0::TACK_delay, _QSEC_tkr::TACK_delay, _QSEC_cal_v0::TACK_delay, _QSEC_cal::TACK_delay, _QSEC_tkr_v0::threshold, _QSEC_tkr::threshold, _QSEC_specific_v0::tkr, _QSEC_specific::tkr, _QSEC_cal_v0::ULD, _QSEC_cal::ULD, _QSEC_ctx::version, _QSEC_acd_v0::veto, _QSEC_acd::veto, _QSEC_acd_v0::veto_vernier, _QSEC_acd::veto_vernier, _QSEC_global_v0::zero_supp, and _QSEC_global::zero_supp.
Referenced by QSEC_updateAtContribution().
void QSEC_reportCtx | ( | const QSEC_ctx * | ctx, | |
FILE * | fp | |||
) |
Write a formatted ASCII description of the contents of the context to the file fp.
ctx | Pointer to a context structure | |
fp | Pointer to the output file |
References _QSEC_ctx::mode, reportCtxAcd(), reportCtxCal(), and reportCtxTkr().
size_t QSEC_sizeofCtx | ( | void | ) |
Return the size of the QSEC context structure.
Referenced by QSEC_allocCtx(), and QSEC_constructCtx().
void reportCtxAcd | ( | const QSEC_ctx * | ctx, | |
FILE * | fp | |||
) | [static] |
Write a formatted ASCII description of the contents of the context to the file fp.
ctx | Pointer to a context structure | |
fp | Pointer to the output file |
References _QSEC_specific::acd, _QSEC_acd::bias_dac, _QSEC_acd::channel, _QSEC_acd::hitmap_delay, _QSEC_acd::HLD, _QSEC_acd::hold_delay, _QSEC_acd::injection, _QSEC_acd::PHA, _QSEC_acd::range, reportCtxChannel(), reportCtxGlobal(), reportCtxSetting(), _QSEC_ctx::specific, _QSEC_acd::veto, and _QSEC_acd::veto_vernier.
Referenced by QSEC_reportCtx().
void reportCtxCal | ( | const QSEC_ctx * | ctx, | |
FILE * | fp | |||
) | [static] |
Write a formatted ASCII description of the contents of the context to the file fp.
ctx | Pointer to a context structure | |
fp | Pointer to the output file |
References _QSEC_cal::accept, _QSEC_specific::cal, _QSEC_cal::calib_gain, _QSEC_cal::channel, _QSEC_cal::first_range, _QSEC_cal::high_cal_ena, _QSEC_cal::high_gain, _QSEC_cal::high_rng_ena, _QSEC_cal::high_thresh, _QSEC_cal::high_trg_ena, _QSEC_cal::injection, _QSEC_cal::low_cal_ena, _QSEC_cal::low_gain, _QSEC_cal::low_rng_ena, _QSEC_cal::low_thresh, _QSEC_cal::low_trg_ena, reportCtxChannel(), reportCtxGlobal(), reportCtxSetting(), _QSEC_ctx::specific, _QSEC_cal::TACK_delay, and _QSEC_cal::ULD.
Referenced by QSEC_reportCtx().
void reportCtxChannel | ( | FILE * | fp, | |
const char * | string, | |||
const QSEC_channel * | chan | |||
) | [static] |
Print out channel information.
fp | Pointer to the destination file | |
string | Parameter name | |
chan | Pointer to channel information |
References _QSEC_channel::flags, and _QSEC_channel::number.
Referenced by reportCtxAcd(), reportCtxCal(), and reportCtxTkr().
void reportCtxGlobal | ( | const QSEC_ctx * | ctx, | |
FILE * | fp | |||
) | [static] |
Write a formatted ASCII description of the contents of the context to the file fp.
ctx | Pointer to a context structure | |
fp | Pointer to the output file |
References _QSEC_ctx::global, _QSEC_global::latc_cfg, _QSEC_global::lci_cfg, _QSEC_global::one_range, _QSEC_global::period, _QSEC_global::strobe, and _QSEC_global::zero_supp.
Referenced by reportCtxAcd(), reportCtxCal(), and reportCtxTkr().
void reportCtxSetting | ( | FILE * | fp, | |
const char * | string, | |||
unsigned short | value | |||
) | [static] |
Print out a single context parameter.
fp | Pointer to the destination file | |
string | Parameter name | |
value | Context parameter |
Referenced by reportCtxAcd(), reportCtxCal(), and reportCtxTkr().
void reportCtxTkr | ( | const QSEC_ctx * | ctx, | |
FILE * | fp | |||
) | [static] |
Write a formatted ASCII description of the contents of the context to the file fp.
ctx | Pointer to a context structure | |
fp | Pointer to the output file |
References _QSEC_tkr::channel, _QSEC_tkr::injection, reportCtxChannel(), reportCtxGlobal(), reportCtxSetting(), _QSEC_ctx::specific, _QSEC_tkr::split_high, _QSEC_tkr::split_low, _QSEC_tkr::TACK_delay, _QSEC_tkr::threshold, and _QSEC_specific::tkr.
Referenced by QSEC_reportCtx().