GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCFG / V1-2-3

Constituent: lcfg     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LCFG_p.h File Reference

Private definitions for the LAT configuration system (LCFG). More...

#include "RIM/RIM.h"
#include "PBS/FPA.h"
#include "LEM/list.h"

Include dependency graph for LCFG_p.h:

This graph shows which files directly or indirectly include this file:


Data Structures

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.

Detailed Description

Private definitions for the LAT configuration system (LCFG).

Author:
James Swain & Owen Saxton
Id
LCFG_p.h,v 1.3 2007/11/12 22:27:08 saxton Exp

Enumeration Type Documentation

anonymous enum
 

Constants used in sending data to the SSR.

Enumerator:
LCFG_DATAGRAM_SIZE  Each datagram is 128K words.
LCFG_N_DATAGRAMS  Number of datagrams available.


Function Documentation

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.

Parameters:
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
Return values:
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

unsigned LCFG_consumeMap RIM_map *  map,
unsigned  fid,
unsigned *  key
 

Read map data.

This routine reads a map data file into a map structure.

Parameters:
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
Return values:
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

void LCFG_deleteDecode RIM_decodeFn **  decode  ) 
 

Free the memory previously allocated using LCFG_newDecode.

Parameters:
decode Pointer to an allocated array of function pointers

void LCFG_deleteLoad RIM_loadFn **  load  ) 
 

Free the memory previously allocated using LCFG_newLoad.

Parameters:
load Pointer to an allocated array of function pointers

void LCFG_deleteRead RIM_readFn **  read  ) 
 

Free the memory previously allocated using LCFG_newRead.

Parameters:
read Pointer to an allocated array of function pointers

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.

Parameters:
cr Multi-item command-response list used to load the registers
Return values:
LCFG_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

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.

Parameters:
cr Multi-item command-response list used to read the registers
Return values:
LCFG_SUCCESS Always

RIM_decodeFn** LCFG_newDecode void   ) 
 

Build an array of function pointers associating RIM_type to a function that decodes the payloads.

Returns:
Pointer to an allocated array of RIM_decodeFn function pointers

RIM_loadFn** LCFG_newLoad void   ) 
 

Build an array of function pointers associating RIM_type to a function that loads the registers of that type.

Returns:
Pointer to an allocated array of RIM_loadFn function pointers

RIM_readFn** LCFG_newRead void   ) 
 

Build an array of function pointers associating RIM_tye to a function that reads the registers of that type.

Returns:
Pointer to an allocated array of RIM_readFn function pointers

unsigned LCFG_record RIM *  rim,
FPA_fcb *  fpa
 

Send the RIM to the SSR.

Parameters:
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
Returns:
One of the error codes from ITC_send, LCFG_OUTSIZE if there is a coding error and one of the contributions will not fit into an otherwise empty datagram, LCFG_SUCCESS if all goes well.

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.

Parameters:
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.
Return values:
LCFG_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands


Generated on Wed Apr 22 01:15:35 2009 by  doxygen 1.4.4