GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / dev > latc_cmn / rhel4-32
#include <LATC/lrd.h>
#include <stdio.h>
Typedefs | |
typedef struct LATC_map_ | LATC_map |
Forward declaration of the LATC_map structure, a bit-map of all the LAT components. | |
Functions | |
LATC_map * | LATC_newMap (void) |
Allocate and initialise a new LATC_map. | |
void | LATC_deleteMap (LATC_map *map) |
Free the memory allocated for the LATC_map structure. | |
unsigned | LATC_setBit (LATC_map *map, LATC_type type, const LATC_addr *addr) |
Set a bit in the map. | |
unsigned | LATC_clearBit (LATC_map *map, LATC_type type, const LATC_addr *addr) |
Clear a bit in the map. | |
int | LATC_checkBit (const LATC_map *map, LATC_type type, const LATC_addr *addr) |
Check a bit in the map. | |
int | LATC_countBits (const LATC_map *map, LATC_type type) |
Clear a bit in the map. | |
void | LATC_setACD (LATC_map *map) |
Set all the bits in the ARC and AFE submaps. | |
void | LATC_clearACD (LATC_map *map) |
Clear all the bits in the ARC and AFE submaps. | |
unsigned | LATC_setTWR (LATC_map *map, unsigned twr) |
Set all the bits in TEM, TIC, CCC, CRC, CFE, TCC TRC and TFE submaps corresponding to a particular tower. | |
unsigned | LATC_clearTWR (LATC_map *map, unsigned twr) |
Clear all the bits in TEM, TIC, CCC, CRC, CFE, TCC TRC and TFE submaps corresponding to a particular tower. | |
unsigned | LATC_setByTWR (LATC_map *map, LATC_type type, unsigned twr) |
unsigned | LATC_clearByTWR (LATC_map *map, LATC_type type, unsigned twr) |
void | LATC_setMap (LATC_map *map) |
Set the map. | |
void | LATC_clearMap (LATC_map *map) |
Clear the map. | |
void | LATC_dumpMap (LATC_map *map, FILE *fp) |
Print out the map. |
Check a bit in the map.
map | Structure being manipulated | |
type | Identifies map to manipulate | |
addr | bit to check |
0 | if the bit is clear | |
1 | if the bit is set |
References checkBit(), mapIndex(), and LATC_map_::ptr.
void LATC_clearACD | ( | LATC_map * | map | ) |
Clear all the bits in the ARC and AFE submaps.
map | Pointer to a LATC_map structure |
References clearMap(), and LATC_map_::ptr.
Clear a bit in the map.
map | Structure being manipulated | |
type | Identifies map to manipulate | |
addr | bit to clear |
References clearBit(), mapIndex(), and LATC_map_::ptr.
map | Pointer to a LATC_map structure | |
type | Identifies the sub-map to manipulate | |
twr | Index of a tower |
LATC_BADTYPE | if the type does not exist | |
LATC_MAPLESS | if there is no sub-map corresponding to this type | |
LATC_BADADDR | if the twr ID is out of range | |
LATC_SUCCESS | if everything goes well |
References clearBit(), mapRange(), and LATC_map_::ptr.
Referenced by LATC_clearTWR().
void LATC_clearMap | ( | LATC_map * | map | ) |
Clear the map.
map | Structure being manipulated |
References clearMap(), and LATC_map_::ptr.
Referenced by LATC_clearIMM().
unsigned LATC_clearTWR | ( | LATC_map * | map, | |
unsigned | twr | |||
) |
Clear all the bits in TEM, TIC, CCC, CRC, CFE, TCC TRC and TFE submaps corresponding to a particular tower.
map | Pointer to a LATC_map structure | |
twr | Index of a tower |
LATC_BADADDR | if the twr ID is out of range | |
LATC_SUCCESS | if everything goes well |
References LATC_clearByTWR().
Clear a bit in the map.
map | Structure being manipulated | |
type | Identifies map to count |
References countMap(), and LATC_map_::ptr.
void LATC_deleteMap | ( | LATC_map * | map | ) |
Free the memory allocated for the LATC_map structure.
map | Pointer to a map created by LATC_newMap |
Referenced by LATC_deleteIMM().
void LATC_dumpMap | ( | LATC_map * | map, | |
FILE * | fp | |||
) |
Print out the map.
map | Pointer to an initialised map structure | |
fp | Pointer to file where the map should be written |
References LATC_map_::ptr, and sizeofMap().
LATC_map* LATC_newMap | ( | void | ) |
Allocate and initialise a new LATC_map.
References LATC_map_::ptr, and sizeofMap().
Referenced by LATC_newIMM().
void LATC_setACD | ( | LATC_map * | map | ) |
Set all the bits in the ARC and AFE submaps.
map | Pointer to a LATC_map structure |
References LATC_map_::ptr, and setMap().
Set a bit in the map.
map | Structure being manipulated | |
type | Identifies map to manipulate | |
addr | bit to set |
References mapIndex(), LATC_map_::ptr, and setBit().
map | Pointer to a LATC_map structure | |
type | Identifies the sub-map to manipulate | |
twr | Index of a tower |
LATC_BADTYPE | if the type does not exist | |
LATC_MAPLESS | if there is no sub-map corresponding to this type | |
LATC_BADADDR | if the twr ID is out of range | |
LATC_SUCCESS | if everything goes well |
References mapRange(), LATC_map_::ptr, and setBit().
Referenced by LATC_setTWR().
void LATC_setMap | ( | LATC_map * | map | ) |
Set the map.
map | Pointer to a LATC_map structure |
References LATC_map_::ptr, and setMap().
unsigned LATC_setTWR | ( | LATC_map * | map, | |
unsigned | twr | |||
) |
Set all the bits in TEM, TIC, CCC, CRC, CFE, TCC TRC and TFE submaps corresponding to a particular tower.
map | Pointer to a LATC_map structure | |
twr | Index of a tower |
LATC_BADADDR | if the twr ID is out of range | |
LATC_SUCCESS | if everything goes well |
References LATC_setByTWR().