GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / dev > latc_cmn_wb / mv2304
#include <map.h>
#include <AG_latcType_p.h>
#include <stddef.h>
Classes | |
struct | LATC_map_ |
Structure that acts as a bit-map of all the LAT components. More... | |
Defines | |
#define | MAX_MAP ( (N_MAX/32) + 1 ) |
Number of 32 bit words guarenteed to be big enough to hold a map large enough for any component type. | |
Functions | |
unsigned | mapIndex (const LATC_map *map, LATC_type type, const LATC_addr *addr, unsigned *index) |
Convert the address into an index appropriate for this type of map as well as performing various checks on the input parameters. | |
unsigned | mapRange (const LATC_map *map, LATC_type type, unsigned twr, unsigned *start, unsigned *end) |
Find start and end indicies to use in a loop over all the bits in one tower (ie the first bit of the tower and the bit one past the last bit of the same tower). |
unsigned mapIndex | ( | const LATC_map * | map, | |
LATC_type | type, | |||
const LATC_addr * | addr, | |||
unsigned * | index | |||
) |
Convert the address into an index appropriate for this type of map as well as performing various checks on the input parameters.
map | Pointer to a map structure | |
type | Type of the map | |
addr | Pointer to an address structure identifying the required bit | |
index | Pointer to location to store the calculated index |
LATC_BADTYPE | if the type does not exist | |
LATC_MAPLESS | if there is no sub-map corresponding to this type | |
LATC_BADBCAST | if the address contains a mixture of broadcast and singlecast addresses | |
LATC_BADADDR | if any component of the address is out of range | |
LATC_BADINDEX | if the final index exceeds the total number of bits in the map | |
LATC_SUCCESS | if everything goes well |
References LATC_getIndex().
Referenced by LATC_checkBit(), LATC_clearBit(), LATC_setBit(), and mapRange().
unsigned mapRange | ( | const LATC_map * | map, | |
LATC_type | type, | |||
unsigned | twr, | |||
unsigned * | start, | |||
unsigned * | end | |||
) |
Find start and end indicies to use in a loop over all the bits in one tower (ie the first bit of the tower and the bit one past the last bit of the same tower).
map | Pointer to a map structure | |
type | Type of the map | |
twr | Tower ID | |
start | Pointer to location to store the index of the start bit | |
end | Pointer to location to store the index of the end bit |
LATC_BADTYPE | if the type does not exist | |
LATC_MAPLESS | if there is no sub-map corresponding to this type | |
LATC_BADBCAST | if the address contains a mixture of broadcast and singlecast addresses | |
LATC_BADADDR | if any component of the address is out of range | |
LATC_BADINDEX | if the final index exceeds the total number of bits in the map | |
LATC_SUCCESS | if everything goes well |
References LATC_addr::cpt, LATC_getIndex(), and mapIndex().
Referenced by LATC_clearByTWR(), and LATC_setByTWR().