GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCFG / V1-2-5 > lcfg / rhel6-64
#include <RIM/RIM.h>
#include <PBS/FPA.h>
#include <LEM/list.h>
Classes | |
struct | LCFG_decode |
Structure used to hold information used in decoding the response to register read operations. More... | |
Enumerations | |
enum | { LCFG_DATAGRAM_SIZE = 1024 * 512, LCFG_N_DATAGRAMS = 4 } |
Constants used in sending data to the SSR. More... | |
Functions | |
unsigned | LCFG_consume (RIM *rim, unsigned lcm, unsigned *key) |
Read configuration data. | |
unsigned | LCFG_consumeMap (RIM_map *map, unsigned fid, unsigned *key) |
Read map data. | |
void | LCFG_deleteDecode (RIM_decodeFn **decode) |
Free the memory previously allocated using LCFG_newDecode. | |
void | LCFG_deleteLoad (RIM_loadFn **load) |
Free the memory previously allocated using LCFG_newLoad. | |
void | LCFG_deleteRead (RIM_readFn **read) |
Free the memory previously allocated using LCFG_newRead. | |
unsigned | LCFG_finishLoad (LEM_micr *cr) |
Finish a load operation. | |
unsigned | LCFG_finishRead (LEM_micr *cr) |
Finish a read operation. | |
RIM_decodeFn ** | LCFG_newDecode (void) |
Build an array of function pointers associating RIM_type to a function that decodes the payloads. | |
RIM_loadFn ** | LCFG_newLoad (void) |
Build an array of function pointers associating RIM_type to a function that loads the registers of that type. | |
RIM_readFn ** | LCFG_newRead (void) |
Build an array of function pointers associating RIM_tye to a function that reads the registers of that type. | |
unsigned | LCFG_record (RIM *rim, FPA_fcb *fpa) |
Send the RIM to the SSR. | |
unsigned | LCFG_setTrigger (RIM *rim, int enable, int marker, LEM_micr *cr) |
Enable or disable triggers. |
anonymous enum |
unsigned LCFG_consume | ( | RIM * | rim, | |
unsigned | lcm, | |||
unsigned * | key | |||
) |
Read configuration data.
This routine reads a configuration master file then reads each file in the master file into a RIM structure.
rim | Pointer to the RIM to repopulate with the configuration information | |
lcm | File ID of the LAT configuration master file | |
key | Pointer to location to place the key of file lcm |
LCFG_SUCCESS | if all goes well | |
LCFG_BADFOPEN | if the fid, or any of the names the configuration master file contains, does not match a valid file. | |
LCFG_BADTYPE | if the file contains a bad type identifier | |
LCFG_BADREAD | if an error occurs whilst the file is being read |
References fileClose(), fileOpen(), fileReadData(), fileReadRecd(), _fileParm::name, and _fileParm::versn.
Referenced by LCFG_cache().
unsigned LCFG_consumeMap | ( | RIM_map * | map, | |
unsigned | fid, | |||
unsigned * | key | |||
) |
Read map data.
This routine reads a map data file into a map structure.
map | Map structure to populate from file | |
fid | ID of the file containing the data to use | |
key | Pointer to location to place the key of file fid |
LCFG_SUCCESS | if all goes well | |
LCFG_BADFOPEN | if the fid does not match a valid file | |
LCFG_BADREAD | if an error occurs whilst the file is being read |
References fileClose(), fileKey(), fileOpen(), fileReadData(), fileReadRecd(), _fileParm::name, and _fileParm::versn.
Referenced by LCFG_ignore().
void LCFG_deleteDecode | ( | RIM_decodeFn ** | decode | ) |
Free the memory previously allocated using LCFG_newDecode.
decode | Pointer to an allocated array of function pointers |
Referenced by LCFG_teardown().
void LCFG_deleteLoad | ( | RIM_loadFn ** | load | ) |
Free the memory previously allocated using LCFG_newLoad.
load | Pointer to an allocated array of function pointers |
Referenced by LCFG_teardown().
void LCFG_deleteRead | ( | RIM_readFn ** | read | ) |
Free the memory previously allocated using LCFG_newRead.
read | Pointer to an allocated array of function pointers |
Referenced by LCFG_teardown().
unsigned LCFG_finishLoad | ( | LEM_micr * | cr | ) |
Finish a load operation.
The supplied command list is queued and completion is waited for if it has outstanding items on it.
cr | Multi-item command-response list used to load the registers |
LCFG_SUCCESS | if all goes well | |
LEM_* | if there is an error arising from one of the register load commands |
Referenced by LCFG_configure(), LCFG_loadAfeConfig(), LCFG_loadCfeConfig0(), LCFG_loadCfeConfig1(), LCFG_loadTfeDac(), and LCFG_loadTkrSplits().
unsigned LCFG_finishRead | ( | LEM_micr * | cr | ) |
Finish a read operation.
The supplied command list is queued and completion is waited for if it has outstanding items on it.
cr | Multi-item command-response list used to read the registers |
LCFG_SUCCESS | Always |
References decodeList().
Referenced by LCFG_capture(), and readSPT().
RIM_decodeFn** LCFG_newDecode | ( | void | ) |
Build an array of function pointers associating RIM_type to a function that decodes the payloads.
References decodeAEM(), decodeAFE(), decodeARC(), decodeCCC(), decodeCFE(), decodeCRC(), decodeGEM(), decodeROI(), decodeSCH(), decodeSPT(), decodeTAM(), decodeTCC(), decodeTDC(), decodeTEM(), decodeTFE(), decodeTIC(), decodeTIE(), decodeTRC(), and decodeWIN().
Referenced by LCFG_initialise().
RIM_loadFn** LCFG_newLoad | ( | void | ) |
Build an array of function pointers associating RIM_type to a function that loads the registers of that type.
References loadAEM(), loadAFE(), loadARC(), loadCCC(), loadCFE(), loadCRC(), loadGEM(), loadROI(), loadSCH(), loadSPT(), loadTAM(), loadTCC(), loadTDC(), loadTEM(), loadTFE(), loadTIC(), loadTIE(), loadTRC(), and loadWIN().
Referenced by LCFG_initialise().
RIM_readFn** LCFG_newRead | ( | void | ) |
Build an array of function pointers associating RIM_tye to a function that reads the registers of that type.
References readAEM(), readAFE(), readARC(), readCCC(), readCFE(), readCRC(), readGEM(), readROI(), readSCH(), readSPT(), readTAM(), readTCC(), readTDC(), readTEM(), readTFE(), readTIC(), readTIE(), readTRC(), and readWIN().
Referenced by LCFG_initialise().
unsigned LCFG_record | ( | RIM * | rim, | |
FPA_fcb * | fpa | |||
) |
Send the RIM to the SSR.
rim | Pointer to the RIM structure to send to the SSR | |
fpa | Pointer to the fixed packet allocator that will provide storage for the datagrams produced by this function |
References addData(), endDgm(), SSR_pkt::fpa, SSR_pkt::qitem, startCtb(), and startDgm().
Referenced by LCFG_consign().
unsigned LCFG_setTrigger | ( | RIM * | rim, | |
int | enable, | |||
int | marker, | |||
LEM_micr * | cr | |||
) |
Enable or disable triggers.
This routine enables or disables LAT triggers. If the marker parameter is non-zero, the LAT is first configured to broadcast a trigger message to all CPUs upon receipt of a solicited trigger, a solicited trigger is issued, and the configuration restored from the RIM data.
rim | RIM structure containing LAT configuration data | |
enable | If non-zero, triggers are anabled; otherwise disabled | |
marker | If non-zero, causes a solicited trigger with this value in the event data. | |
cr | Pointer to the multi-item command/response list. |
LCFG_SUCCESS | if all goes well | |
LEM_* | if there is an error arising from one of the register load commands |
Referenced by LCFG_disableTriggers(), and LCFG_enableTriggers().