GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LEM / V4-5-1
Constituent: lem_lists     Tag: rad750
#include "LEM/msg_macros.h"
#include "LEM/list_structs.h"
#include "LEM/encode.h"
Include dependency graph for list_macros.h:
This graph shows which files directly or indirectly include this file:
Defines | |
#define | LEM_ALIGN(_buf, _offset, _alignment) (((unsigned int)(_buf) + (_offset) + ((_alignment) -1)) & ~((_alignment)-1)) |
Get the first aligned pointer in the buffer that is at least _offset into the buffer. | |
#define | LEM_ALIGN_REQUEST(_buf, _offset) LEM_ALIGN(_buf, _offset, LCB_REQUEST_LIST_ALIGN) |
Get the first pointer with the correct aligment for a request list that is at least _offset into the buffer. | |
#define | LEM_ALIGN_RESULT(_buf,_offset) LEM_ALIGN(_buf, _offset, LCB_RESULT_LIST_ALIGN) |
Get the first pointer with the correct aligment for a result list that is at least _offset into the buffer. | |
#define | LEM_REQUEST_SIZE(N_CI) ( sizeof(LCB_cl_hdr) + N_CI * sizeof(LEM_ci)) |
Size of command list with N_CI command items. | |
#define | LEM_RESPONSE_SIZE(N_CI) (sizeof(LCBD_xcb) + sizeof(LCB_rl_hdr) + N_CI * sizeof(LEM_rsp_ri)) |
Size of a response result list with N_CI items. | |
#define | LEM_RESPONSELESS_SIZE(N_CI) (sizeof(LCBD_xcb) + sizeof(LCB_rl_hdr) + N_CI * sizeof(LEM_cmd_ri)) |
Size of a responsless result list with N_CI items. | |
#define | LEM_DECODE_SIZE(N_CI) ( N_CI * sizeof(LEM_di)) |
Size of a decode list with N_CI items. | |
#define | LEM_SIZE_FOR_CR(N_CI) ( LCB_REQUEST_LIST_ALIGN + LEM_REQUEST_SIZE(N_CI) + LCB_RESULT_LIST_ALIGN + LEM_RESPONSE_SIZE(N_CI) + LEM_DECODE_SIZE(N_CI)) |
Size of a char array needed to accomodate the lists of a command/response structure with N_CI command items. | |
#define | LEM_INIT_CR(CR, BUF, N_CI) |
Initialise a CR struct using a char array that can accomodate the lists of command/response structure with N_CI command items. | |
#define | LEM_RESET_CR(CRP) |
Reset the counters inside a CR struct. | |
#define | LEM_NEXT_CI(CRP) (&CRP->cl->ci[CRP->nf++]) |
Pointer to the current command item in a command/response structure and increment the read counter. | |
#define | LEM_NEXT_RI(CRP) (&CRP->rl->ri[CRP->nr++]) |
Pointer to the current responseful result item in a command/response structure and increment the read counter. | |
#define | LEM_NEXT_EI(CRP) (&CRP->el->ri[CRP->nr++]) |
Pointer to the current responseless result (error) item in a command/response structure and increment the read counter. | |
#define | LEM_CURR_CI(CRP) (&CRP->cl->ci[CRP->nf]) |
Pointer to the current command item in a command/response structure. | |
#define | LEM_CURR_RI(CRP) (&CRP->rl->ri[CRP->nr]) |
Pointer to the current responseful result item in a command/response structure. | |
#define | LEM_CURR_EI(CRP) (&CRP->el->ri[CRP->nr]) |
Pointer to the current responseless result (error) item in a command/response structure. | |
#define | LEM_Q(CRP, RESULT_HANDLER) |
Queue the list, wait for the list to complete, call the result handling function and reset the C/R structure. | |
#define | LEM_Q_IF_FULL(CRP, RESULT_HANDLER) |
If the number of filled command items equals the total number of items in the command and response lists, queue the list. | |
#define | LEM_READ(CRP, DECODE_FN, DEST, ENCODE_FN, ARGS...) |
Fill the command item to perform the desired read and set the fields of the corresponding decode item; if this is the last item on the list, queue the list. | |
#define | LEM_LOAD(CRP, ENCODE_FN, ARGS...) |
Fill the command item to perform the desired load; if this is the last item on the list, queue the list. | |
#define | LEM_CMD(CRP, ENCODE_FN, ARGS...) |
Fill the command item to perform the dataless command; if this is the last item on the list, queue the list. | |
#define | LEM_RAST(CRP, DECODE_FN, DEST, ENCODE_FN, ARGS...) |
Read-last; Perform a LEM_READ but force the Q. | |
#define | LEM_LAST(CRP, ENCODE_FN, ARGS...) |
Load-last; Perform a LEM_LOAD but force the Q. | |
#define | LEM_CAST(CRP, ENCODE_FN, ARGS...) |
Command-last; Perform a LEM_CMD but force the Q. | |
#define | LEM_ACD_READ(CRP, DECODE_FN, DEST, ENCODE_FN, ARGS...) |
Fill the command item to perform the desired read and set the fields of the corresponding decode item; if this is the last item on the list, queue the list. | |
#define | LEM_ACD_LOAD(CRP, ENCODE_FN, ARGS...) |
Fill the command item to perform the desired load; if this is the last item on the list, queue the list. | |
#define | LEM_ACD_CMD(CRP, ENCODE_FN, ARGS...) |
Fill the command item to perform the dataless command; if this is the last item on the list, queue the list. | |
#define | LEM_ACD_RAST(CRP, DECODE_FN, DEST, ENCODE_FN, ARGS...) |
Read-last; Perform a LEM_ACD_READ but force the Q. | |
#define | LEM_ACD_LAST(CRP, ENCODE_FN, ARGS...) |
Load-last; Perform a LEM_ACD_LOAD but force the Q. | |
#define | LEM_ACD_CAST(CRP, ENCODE_FN, ARGS...) |
Command-last; Perform a LEM_ACD_CMD but force the Q. |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_DATALESS, ## ARGS, 0); \ LEM_Q(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE functions, except the first two, which are filled in automatically |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_DATALESS, ## ARGS, 0); \ LEM_Q_IF_FULL(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE functions, except the first two and the last, which are filled in automatically |
|
Value: {\ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_LOAD, ## ARGS); \ LEM_Q(CRP, LEM_handleLoadErrors);\ } CRP Pointer to a multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_LOAD, ## ARGS); \ LEM_Q_IF_FULL(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two, which are filled in automatically |
|
Value: {\ CRP->lem_di[CRP->nf].fn = (pDecode)(DECODE_FN); \ CRP->lem_di[CRP->nf].des = DEST; \ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_READ, ## ARGS, 0); \ LEM_Q(CRP, LEM_decode);\ } CRP Pointer to a multi-item command/response lists DECODE_FN Function to use to decode the results DEST Pointer to location to place the decoded results ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: { \ CRP->lem_di[CRP->nf].fn = (pDecode)(DECODE_FN); \ CRP->lem_di[CRP->nf].des = DEST; \ ENCODE_FN(LEM_NEXT_CI(CRP), ACD_CMD_READ, ## ARGS, 0); \ LEM_Q_IF_FULL(CRP, LEM_decode);\ } CRP Pointer to multi-item command/response lists DECODE_FN Function to use to decode the results DEST Pointer to location to place the decoded results ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_DATALESS, ## ARGS, 0); \ LEM_Q(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE functions, except the first two, which are filled in automatically |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_DATALESS, ## ARGS, 0); \ LEM_Q_IF_FULL(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE functions, except the first two and the last, which are filled in automatically |
|
Pointer to the current responseless result (error) item in a command/response structure. Assumes that the command list was a homogeneous list of loads. |
|
Pointer to the current responseful result item in a command/response structure. Assumes that the command list was a homogeneous list of reads |
|
Value: {\ CR.ni = N_CI; \ CR.lcbd_cl = (LCBD_cl*)LEM_ALIGN_REQUEST(BUF, 0); \ CR.lcbd_rl = (LCBD_rl*)LEM_ALIGN_RESULT (CR.lcbd_cl, LEM_REQUEST_SIZE(N_CI)); \ CR.lem_di = (LEM_di*)((char*)(CR.lcbd_rl) + LEM_RESPONSE_SIZE(N_CI)); \ CR.nf = 0; \ CR.nr = 0; \ CR.cl = (LEM_micl* )(CR.lcbd_cl); \ CR.el = (LEM_cmd_mirl*)(CR.lcbd_rl); \ CR.rl = (LEM_rsp_mirl*)(CR.lcbd_rl); \ }
|
|
Value: {\ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_LOAD, ## ARGS); \ LEM_Q(CRP, LEM_handleLoadErrors);\ } CRP Pointer to a multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: { \ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_LOAD, ## ARGS); \ LEM_Q_IF_FULL(CRP, LEM_handleLoadErrors);\ } CRP Pointer to multi-item command/response lists ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two, which are filled in automatically |
|
Pointer to the current responseless result (error) item in a command/response structure and increment the read counter. Assumes that the command list was a homogeneous list of loads. |
|
Pointer to the current responseful result item in a command/response structure and increment the read counter. Assumes that the command list was a homogeneous list of reads |
|
Value: { \ CHECK_CALL(LEM_queueWait (CRP)); \ CHECK_CALL(RESULT_HANDLER(CRP)); \ LEM_RESET_CR(CRP); \ } CRP Pointer to a multi-item command/response list RESULT_HANDLER One of LEM_handleLoadErrors, LEM_handleReadErrors or LEM_decode |
|
Value: if(CRP->ni == CRP->nf) { \ LEM_Q(CRP, RESULT_HANDLER); \ } CRP Pointer to a multi-item command response list RESULT_HANDLER One of LEM_handleLoadErrors, LEM_handleReadErrors or LEM_decode |
|
Value: {\ CRP->lem_di[CRP->nf].fn = (pDecode)(DECODE_FN); \ CRP->lem_di[CRP->nf].des = DEST; \ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_READ, ## ARGS, 0); \ LEM_Q(CRP, LEM_decode);\ } CRP Pointer to a multi-item command/response lists DECODE_FN Function to use to decode the results DEST Pointer to location to place the decoded results ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: { \ CRP->lem_di[CRP->nf].fn = (pDecode)(DECODE_FN); \ CRP->lem_di[CRP->nf].des = DEST; \ ENCODE_FN(LEM_NEXT_CI(CRP), CMD_READ, ## ARGS, 0); \ LEM_Q_IF_FULL(CRP, LEM_decode);\ } CRP Pointer to multi-item command/response lists DECODE_FN Function to use to decode the results DEST Pointer to location to place the decoded results ENCODE_FN Function to use to fill the command item ARGS... Arguments to the ENCODE function, except the first two and the last one, which are filled in automatically |
|
Value: {\ CRP->nf = 0; \ CRP->nr = 0; \ }
|