GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / V3-1-2 > rim / linux-gcc
#include <RIM/RIM.h>
#include <RIM_AG_types_p.h>
#include <MSG/MSG_pubdefs.h>
#include <stdio.h>
Classes | |
struct | FldDescription |
Parameters necessary to describe a field within a register. More... | |
struct | RegDescription |
Description of a register within a component. More... | |
struct | CptDescription |
Description of a component of the LAT. More... | |
Defines | |
#define | MAX_MAP ((N_MAX / 32) + 1) |
Number of 32 bit words guaranteed to be big enough to hold a map large enough for any component type. | |
Enumerations | |
enum | { RIM_RT_MAP = 0, RIM_RT_DFT = 0x40, RIM_RT_EXCP = 0x80, RIM_RT_MASK = 0xc0 } |
Exported data record types. More... | |
Functions | |
int | RIM_addrRng (RIM_type type, int level) |
Get the address range of a component level. | |
const CptDescription * | RIM_cptDesc (RIM_type type) |
Get the address of a component description. | |
void | RIM_getFld (const void *cpt, RIM_type type, int regId, int fldId, void *value) |
Puts the contents of the fldId field of register regId into value. | |
int | RIM_number (RIM_type type) |
Get the number of instances of a component. | |
void | RIM_getReg (const void *cpt, RIM_type type, int regId, void *value) |
Puts the contents of the target register regId into value. | |
void | RIM_layerHigh (const Layer_addr *layer, TEM_addr *tem) |
Convert the conceptual layer addressing of a TFE to the hierarchical form used to communicate with the LAT. | |
void | RIM_layerLow (const Layer_addr *layer, TEM_addr *tem) |
Convert the conceptual layer addressing of a TFE to the hierarchical form used to communicate with the LAT. | |
int | RIM_regEnum (RIM_type type, int regId) |
Convert the public register ID in to the RIM internal register ID. | |
int | RIM_setFld (void *cpt, RIM_type type, int regId, int fldId, const void *value) |
Sets the tgtId field of the regId register of cpt structure to value. | |
void | RIM_setReg (void *cpt, RIM_type type, int regId, const void *value) |
Set the regId register of cpt structure to value. | |
const char * | RIM_typeName (RIM_type type) |
Get the name of a component. |
$Id: RIM_p.h,v 1.4 2011/03/27 06:53:19 saxton Exp $
anonymous enum |
int RIM_addrRng | ( | RIM_type | type, | |
int | level | |||
) |
Get the address range of a component level.
This is an internal routine, so no checking is done on the type.
type | The type ID of the component | |
level | The address level |
Referenced by RIM_loadAfeConfig(), RIM_loadCfeConfig0(), RIM_loadCfeConfig1(), RIM_loadSplit(), RIM_loadTfeDac(), and RIM_setSplit().
const CptDescription* RIM_cptDesc | ( | RIM_type | type | ) |
Get the address of a component description.
This is an internal routine, so no checking is done on the type.
type | The type ID of the component |
Referenced by RIM_compare(), RIM_construct(), RIM_contrast(), RIM_deleteData(), RIM_export(), RIM_getFld(), RIM_getReg(), RIM_import(), RIM_load(), RIM_loadAfeConfig(), RIM_loadCfeConfig0(), RIM_loadCfeConfig1(), RIM_loadTfeDac(), RIM_read(), RIM_regEnum(), RIM_setFld(), RIM_setReg(), and sizeofStore().
void RIM_getFld | ( | const void * | cpt, | |
RIM_type | type, | |||
int | regId, | |||
int | fldId, | |||
void * | value | |||
) |
Puts the contents of the fldId field of register regId into value.
type | Type of data sought | |
cpt | Pointer to start of the component data. | |
regId | Enumerated ID of the register | |
fldId | Target field | |
value | Location to put the contents of the target field |
References RegDescription::fd, getLngLngFld(), getLongFld(), getShortFld(), CptDescription::rd, RIM_cptDesc(), and CptDescription::width.
void RIM_getReg | ( | const void * | cpt, | |
RIM_type | type, | |||
int | regId, | |||
void * | value | |||
) |
Puts the contents of the target register regId into value.
cpt | Pointer to start of the component data. | |
type | Type of data sought | |
regId | Enumerated ID of the register | |
value | Location to put the contents of the target reg |
References getLngLngReg(), getLongReg(), getShortReg(), RIM_cptDesc(), and CptDescription::width.
Referenced by RIM_correct(), RIM_get(), RIM_loadAfeConfig(), RIM_loadCfeConfig0(), RIM_loadCfeConfig1(), RIM_loadSplit(), and RIM_loadTfeDac().
void RIM_layerHigh | ( | const Layer_addr * | layer, | |
TEM_addr * | tem | |||
) |
Convert the conceptual layer addressing of a TFE to the hierarchical form used to communicate with the LAT.
Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->RIM converter, but is documented here since it is a storage convention.
layer | Address of the TFE / SPT in terms of layers | |
tem | Address of the TFE / TRC in terms of CC/RC |
References _TEM_addr::cc, _Layer_addr::fe, _TEM_addr::fe, _Layer_addr::la, _TEM_addr::rc, _Layer_addr::to, and _TEM_addr::to.
Referenced by RIM_loadTfeDac().
void RIM_layerLow | ( | const Layer_addr * | layer, | |
TEM_addr * | tem | |||
) |
Convert the conceptual layer addressing of a TFE to the hierarchical form used to communicate with the LAT.
Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->RIM converter, but is documented here since it is a storage convention.
layer | Address of the TFE / SPT in terms of layers | |
tem | Address of the TFE / TRC in terms of CC/RC |
References _TEM_addr::cc, _Layer_addr::fe, _TEM_addr::fe, _Layer_addr::la, _TEM_addr::rc, _Layer_addr::to, and _TEM_addr::to.
Referenced by RIM_loadTfeDac().
int RIM_number | ( | RIM_type | type | ) |
Get the number of instances of a component.
This is an internal routine, so no checking is done on the type.
type | The type ID of the component |
Referenced by mapIndex(), RIM_compare(), RIM_construct(), RIM_contrast(), RIM_deleteData(), RIM_export(), RIM_get(), RIM_import(), RIM_read(), RIM_set(), sizeofMap(), and sizeofStore().
int RIM_regEnum | ( | RIM_type | type, | |
int | regId | |||
) |
Convert the public register ID in to the RIM internal register ID.
type | Component type | |
regId | Register ID in terms of hardware numbering (the Huffer docs and LEM) |
References CptDescription::nregs, CptDescription::rd, RegDescription::regId, and RIM_cptDesc().
int RIM_setFld | ( | void * | cpt, | |
RIM_type | type, | |||
int | regId, | |||
int | fldId, | |||
const void * | value | |||
) |
Sets the tgtId field of the regId register of cpt structure to value.
cpt | Pointer to start of the component data. | |
type | Type of component | |
regId | Enum specifying register to write to | |
fldId | Enum specifying field to write to | |
value | Value to set the field to. |
RIM_SUCCESS | If all goes well | |
RIM_FLDRANGE | if the value is too big for the field |
References RegDescription::fd, CptDescription::rd, RIM_cptDesc(), setLngLngFld(), setLongFld(), setShortFld(), and CptDescription::width.
void RIM_setReg | ( | void * | cpt, | |
RIM_type | type, | |||
int | regId, | |||
const void * | value | |||
) |
Set the regId register of cpt structure to value.
cpt | Pointer to start of the component data. | |
type | Type of data sought | |
regId | Enum specifing register to write to | |
value | Value to set register to |
References RIM_cptDesc(), setLngLngReg(), setLongReg(), setShortReg(), and CptDescription::width.
Referenced by RIM_clear(), RIM_construct(), RIM_correct(), and RIM_set().
const char* RIM_typeName | ( | RIM_type | type | ) |
Get the name of a component.
This is an internal routine, so no checking is done on the type.
type | The type ID of the component |