GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCFG / V1-2-4 > lcfg / linux-gcc
#include "RIM/RIM.h"
Classes | |
| struct | _LCFG_hsk |
| Structure to hold LCFG housekeeping information. More... | |
Typedefs | |
| typedef enum _LCFG_source | LCFG_source |
| Identifiers for callers of configure and verify. | |
| typedef RIM_type | LCFG_type |
| Type used to identify components (TEM, TFE etc). | |
| typedef RIM_addr | LCFG_addr |
| Type used to define an address. | |
| typedef struct _LCFG_hsk | LCFG_hsk |
| Structure to hold LCFG housekeeping information. | |
Enumerations | |
| enum | _LCFG_source { LCFG_SRC_UNKNOWN = 0, LCFG_SRC_LPA = 1, LCFG_SRC_LCI = 2, LCFG_SRC_COMMAND = 3 } |
| Identifiers for callers of configure and verify. More... | |
| enum | { LCFG_BAD_TYPE = RIM_BAD_TYPE } |
| Value for an unrecognized type. | |
| enum | { LCFG_BCAST_ADDR = RIM_BCAST_ADDR, N_LCFG_ADDR_CPTS = N_RIM_ADDR_CPTS } |
| Constants associated with addressing LAT component instances. | |
Functions | |
| unsigned | LCFG_cache (unsigned fid) |
| Read a LAT configuration. | |
| unsigned | LCFG_capture (void) |
| Read the registers of the LAT. | |
| unsigned | LCFG_configure (LCFG_source source, unsigned runId) |
| Configure the LAT using the currently cached configuration. | |
| unsigned | LCFG_consign (unsigned dst) |
| Write out the captured data to the SSR. | |
| unsigned | LCFG_disableTriggers (int marker) |
| Disable triggers. | |
| unsigned | LCFG_enableTriggers (int marker) |
| Enable triggers. | |
| unsigned | LCFG_getCacheKey (void) |
| Return the file key identifying the last cached configuration. | |
| unsigned | LCFG_getConfigureKey (void) |
| Return the file key identifying the last configuration loaded. | |
| unsigned | LCFG_getHskInfo (LCFG_hsk *info) |
| Get LAT configuration housekeeping information. | |
| unsigned | LCFG_getIgnoreKey (void) |
| Return the file key identifying the ignore map. | |
| unsigned | LCFG_ignore (unsigned fid) |
| Read the ignore map from the file identified by fid. | |
| unsigned | LCFG_initialise (void) |
| Allocate the resources required for LCFG. | |
| unsigned | LCFG_loadAfeConfig (unsigned int mask, unsigned int value0, unsigned int value1, unsigned int rcMask, unsigned int feMask) |
| Load the AFE configuration register. | |
| unsigned | LCFG_loadCfeConfig0 (unsigned int mask, unsigned int value) |
| Load CFE configuration register 0. | |
| unsigned | LCFG_loadCfeConfig1 (unsigned int mask, unsigned int value0, unsigned int value1, unsigned int cMask) |
| Load CFE configuration register 1. | |
| unsigned | LCFG_loadTfeDac (unsigned int mask, unsigned int value, int nLow, int nHigh) |
| Load the TFE DAC register. | |
| unsigned | LCFG_loadTkrSplits (int nLow, int nHigh) |
| Load TKR split values. | |
| unsigned | LCFG_setDirty (void) |
| Set the LCFG "dirty" flag. | |
| unsigned | LCFG_sizeofHskInfo (void) |
| Get the size of the LAT configuration housekeeping information. | |
| unsigned | LCFG_teardown (void) |
| Release the resources acquired by LCFG_initialise. | |
| unsigned | LCFG_verify (LCFG_source source, unsigned runId) |
| Verify that the captured configuration of the LAT matches the in-memory cache. | |
| enum _LCFG_source |
| unsigned LCFG_cache | ( | unsigned | fid | ) |
Read a LAT configuration.
| fid | The file ID of the master file containing the file IDs of the LAT configuration files to be read |
| 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 while the file is being read |
| unsigned LCFG_capture | ( | void | ) |
Read the registers of the LAT.
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there was an error arising from one of the read commands |
| unsigned LCFG_configure | ( | LCFG_source | source, | |
| unsigned | runId | |||
| ) |
Configure the LAT using the currently cached configuration.
| source | The identity of the caller (LPA, LCI, command) | |
| runId | The ID of the run associated with an LPA or LCI source |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there are errors arising from the register load commands |
| unsigned LCFG_consign | ( | unsigned | dst | ) |
Write out the captured data to the SSR.
| dst | Ignored |
| LCFG_SUCCESS | if all goes well. | |
| LCFG_BADFOPEN | if the file cannot be created | |
| LCFG_BADWRITE | if the final write of the buffer failed | |
| LCFG_BADCLOSE | if the file close failed | |
| LCFG_BADWRITE | if either the map or the configuration data write has an error |
| unsigned LCFG_disableTriggers | ( | int | marker | ) |
Disable triggers.
The window open mask is cleared. If the marker parameter is non-zero, the LAT is first configured to broadcast a trigger message to CPUs upon receipt of a solicited trigger, a solicited trigger is fired, and the configuration restored from the LCFG cache.
| marker | If non-zero, causes a solicited trigger with this value in the event data. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_enableTriggers | ( | int | marker | ) |
Enable triggers.
The window open mask is loaded with the value held in the cache. If the marker parameter is non-zero, the LAT is first configured to broadcast a trigger message to CPUs upon receipt of a solicited trigger, a solicited trigger is fired, and the configuration restored from the LCFG cache.
| marker | If non-zero, causes a solicited trigger with this value in the event data. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_getCacheKey | ( | void | ) |
Return the file key identifying the last cached configuration.
| unsigned LCFG_getConfigureKey | ( | void | ) |
Return the file key identifying the last configuration loaded.
| unsigned LCFG_getHskInfo | ( | LCFG_hsk * | info | ) |
Get LAT configuration housekeeping information.
LAT configuration housekeeping information is copied to the supplied area.
| info | The address of the area to receive the housekeeping information. |
| LCFG_SUCCESS | Always success |
| unsigned LCFG_getIgnoreKey | ( | void | ) |
Return the file key identifying the ignore map.
| unsigned LCFG_ignore | ( | unsigned | fid | ) |
Read the ignore map from the file identified by fid.
| fid | ID of the file containing the map data to use as the ignore map |
| LCFG_SUCCESS | if all goes well |
| unsigned LCFG_initialise | ( | void | ) |
Allocate the resources required for LCFG.
| LCFG_SUCCESS | If the control structure was allocated and initialised successfully | |
| LCFG_BADALLOC | If there was an error allocating memory | |
| LCFG_FPAINIT | If fixed packet initialization failed |
| unsigned LCFG_loadAfeConfig | ( | unsigned int | mask, | |
| unsigned int | value0, | |||
| unsigned int | value1, | |||
| unsigned int | rcMask, | |||
| unsigned int | feMask | |||
| ) |
Load the AFE configuration register.
The AFE configuration register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.
| mask | Mask of bits to be changed from the configuration. | |
| value0 | The value to be masked and merged with the configuration value for front-ends not selected by the RC and FE masks. | |
| value1 | The value to be masked and merged with the configuration value for front-ends selected by the RC and FE masks. | |
| rcMask | Mask of bits, one per RC, specifying which RCs are selected. | |
| feMask | Mask of bits, one per FE, specifying which FEs within selected RCs are selected. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_loadCfeConfig0 | ( | unsigned int | mask, | |
| unsigned int | value | |||
| ) |
Load CFE configuration register 0.
CFE configuration register 0 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.
| mask | Mask of bits to be changed from the configuration. | |
| value | The value to be masked and merged with the configuration value. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_loadCfeConfig1 | ( | unsigned int | mask, | |
| unsigned int | value0, | |||
| unsigned int | value1, | |||
| unsigned int | cMask | |||
| ) |
Load CFE configuration register 1.
CFE configuration register 1 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.
| mask | Mask of bits to be changed from the configuration. | |
| value0 | The value to be masked and merged with the configuration value for front-ends whose bit is clear in the column mask. | |
| value1 | The value to be masked and merged with the configuration value for front-ends whose bit is set in the column mask. | |
| cMask | Mask of bits, one per column, specifying which value is to be used for loading the config register. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_loadTfeDac | ( | unsigned int | mask, | |
| unsigned int | value, | |||
| int | nLow, | |||
| int | nHigh | |||
| ) |
Load the TFE DAC register.
The TFE DAC register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.
| mask | Mask of bits to be changed from the configuration. | |
| value | The value to be masked and merged with the configuration value. | |
| nLow | Number of TFEs talking on the low side, or -1 if the configured values are being used. | |
| nHigh | Number of TFEs talking on the high side, or -1 if the configured values are being used. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_loadTkrSplits | ( | int | nLow, | |
| int | nHigh | |||
| ) |
Load TKR split values.
The tracker RC and FE registers are loaded to reflect the given split values.
| nLow | Number of TFEs to talk on the low side, or -1 if the configured values are to be used. | |
| nHigh | Number of TFEs to talk on the high side, or -1 if the configured values are to be used. |
| LCFG_SUCCESS | if all goes well | |
| LEM_* | if there is an error arising from one of the register load commands |
| unsigned LCFG_setDirty | ( | void | ) |
Set the LCFG "dirty" flag.
This routine is used to indicate that a register whose value is normally managed by LCFG has had its value changed externally, e.g. by LRA.
| LCFG_SUCCESS | Always success. |
| unsigned LCFG_sizeofHskInfo | ( | void | ) |
Get the size of the LAT configuration housekeeping information.
The size of the LAT configuration housekeeping information block is returned.
| unsigned LCFG_teardown | ( | void | ) |
Release the resources acquired by LCFG_initialise.
| LCFG_SUCCESS | This function cannot fail - the return code is for future expansion |
| unsigned LCFG_verify | ( | LCFG_source | source, | |
| unsigned | runId | |||
| ) |
Verify that the captured configuration of the LAT matches the in-memory cache.
| source | The identity of the caller (LPA, LCI, command) | |
| runId | The ID of the run associated with an LPA or LCI source |
| LCFG_SUCCESS | If the current LAT state matches the cached LAT state | |
| LCFG_DIFFER | If the current LAT state differs from the cached LAT state |
1.5.3