GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / dev > rim / rhel6-32
#include <RIM_p.h>
#include <RIM/RIM_msgs.h>
#include <RIM_number.ic>
#include <RIM_AG_init_p.h>
#include <string.h>
Functions | |
static unsigned | mapIndex (const RIM_map *map, RIM_type type, const RIM_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. | |
size_t | RIM_sizeofMap (void) |
Calculate the total size of a RIM_map object. | |
RIM_map * | RIM_constructMap (void *buf) |
Initialise the supplied memory as a RIM_map object. | |
unsigned | RIM_setBit (RIM_map *map, RIM_type type, const RIM_addr *addr) |
Set a bit in the map. | |
unsigned | RIM_clearBit (RIM_map *map, RIM_type type, const RIM_addr *addr) |
Clear a bit in the map. | |
int | RIM_countMap (const RIM_map *map, RIM_type type) |
Count the number of set bits in the map. | |
int | RIM_checkBit (const RIM_map *map, RIM_type type, const RIM_addr *addr) |
Check a bit in the map. | |
void | RIM_clearMap (RIM_map *map) |
Clear the map. |
$Id: RIM_map.c,v 1.3 2011/03/27 06:53:19 saxton Exp $
unsigned mapIndex | ( | const RIM_map * | map, | |
RIM_type | type, | |||
const RIM_addr * | addr, | |||
unsigned * | index | |||
) | [static] |
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 |
RIM_SUCCESS | if everything goes well | |
RIM_TYPEUNKN | if the type does not exist | |
RIM_MAPNONE | if there is no sub-map corresponding to this type | |
RIM_ADDRBCST | if the address contains a mixture of broadcast and singlecast addresses | |
RIM_ADDRRNGE | if any component of the address is out of range | |
RIM_ADDRINDX | if the final index exceeds the total number of bits in the map |
References RIM_getIndex(), and RIM_number().
Referenced by RIM_checkBit(), RIM_clearBit(), and RIM_setBit().
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(), and mapIndex().
Clear a bit in the map.
map | Structure being manipulated | |
type | Identifies map to manipulate | |
addr | bit to clear |
RIM_SUCCESS | if everything goes well | |
RIM_TYPEUNKN | if the type does not exist | |
RIM_MAPNONE | if there is no sub-map corresponding to this type | |
RIM_ADDRBCST | if the address contains a mixture of broadcast and singlecast addresses | |
RIM_ADDRRNGE | if any component of the address is out of range | |
RIM_ADDRINDX | if the final index exceeds the total number of bits in the map |
References clearBit(), and mapIndex().
void RIM_clearMap | ( | RIM_map * | map | ) |
Clear the map.
map | Structure being manipulated |
References clearMap().
Referenced by RIM_clear().
RIM_map* RIM_constructMap | ( | void * | buf | ) |
Initialise the supplied memory as a RIM_map object.
buf | Block of memory, at least as large as RIM_sizeofMap, to initalise as a RIM_map object |
References sizeofMap().
Referenced by RIM_construct().
Count the number of set bits in the map.
map | Structure being manipulated | |
type | Identifies map to count |
Referenced by RIM_export().
Set a bit in the map.
map | Structure being manipulated | |
type | Identifies map to manipulate | |
addr | bit to set |
RIM_SUCCESS | if everything goes well | |
RIM_TYPEUNKN | if the type does not exist | |
RIM_MAPNONE | if there is no sub-map corresponding to this type | |
RIM_ADDRBCST | if the address contains a mixture of broadcast and unicast addresses | |
RIM_ADDRRNGE | if any component of the address is out of range | |
RIM_ADDRINDX | if the final index exceeds the total number of bits in the map |
References mapIndex(), and setBit().
size_t RIM_sizeofMap | ( | void | ) |
Calculate the total size of a RIM_map object.
References sizeofMap().
Referenced by RIM_sizeof().