GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBD / V1-2-8
Constituent: lcbd     Tag: linux-gcc
#include "LCBD/LCB.h"
#include "PBI/Endianness.h"
#include "PBS/FORK.h"
Include dependency graph for LCBD_rst.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _LCBD_rst_null_cbp |
Binds an null descriptor call back routine with its parameter. More... | |
struct | _LCBD_xcb |
The transaction control block. More... | |
union | _LCBD_xcb_que |
Union of the possible data structures the LCBD_xcb can be linked to. More... | |
struct | _LCBD_xcb_sys |
The system portion of the transaction control block. More... | |
struct | _LCBD_xcb_usr |
The user portion of the XCB. More... | |
Defines | |
#define | LCBD_OK 0 |
Success return code, note that this is not an LCBD message code, but may be used as one. | |
#define | LCBD_EXP_DSC_COMPOSE(_cl, _clLen, _lcl2pci) (((unsigned int)(_cl) + (_lcl2pci)) | (_clLen)) |
Composes a command list export descriptor. | |
#define | LCBD_EXP_DSC_REPLACE_LEN(_export, _clLen) (((_export) & ~(LCB_REQUEST_LIST_ALIGN - 1)) | (_clLen)) |
Replaces the length field in the specified export descriptor. | |
#define | LCBD_RST_K_DEFAULT_PRIORITY -1 |
Instructs the result service task creation routine LCBD_rst_handler_create to use a system defined default priority. | |
Typedefs | |
typedef _LCBD_xcb | LCBD_xcb |
Typedef for struct _LCBD_xcb. | |
typedef enum _LCBD_SEQ | LCBD_SEQ |
Typedef for enum _LCBD_SEQ. | |
typedef LI_head | LCBD_post_head |
Typedef for the type of list head that LCBD_post_remove uses. | |
typedef enum _LCBD_RST_FATE_M | LCBD_RST_FATE_M |
Typedef for enum _LCBD_RST_FATE_M. | |
typedef unsigned int(* | LCBD_rst_cb )(void *prm, LCBD_xcb *xcb) |
Driver supplied callback routine for LCBD result processing. | |
typedef _LCBD_xcb_que | LCBD_xcb_que |
Typedef for union _LCBD_xcb_que. | |
typedef _LCBD_xcb_sys | LCBD_xcb_sys |
Typedef for struct _LCBD_xcb_sys. | |
typedef _LCBD_xcb_usr | LCBD_xcb_usr |
Typedef for struct _LCBD_xcb_usr. | |
typedef unsigned int(* | LCBD_rst_null_cb )(void *prm, LCBD lcb) |
Typedef for LCBD NULL descriptor handling callback routine. | |
typedef _LCBD_rst_null_cbp | LCBD_rst_null_cbp |
Typedef for struct _LCBD_rst_null_cbp. | |
Enumerations | |
enum | _LCBD_SEQ { LCBD_SEQ_SUCCESS = 0, LCBD_SEQ_ORDER = 1, LCBD_SEQ_UNKNOWN = 2, LCBD_SEQ_EMPTY = 3, LCBD_SEQ_CNT = 4 } |
Enumerates the sequencing status of command lists. More... | |
enum | _LCBD_RST_FATE_M { LCBD_RST_FATE_M_NO_MORE = (1 << 0), LCBD_RST_FATE_M_NO_REARM = (1 << 1) } |
Bit masks defining the options available on the return values of the result callback routine. More... | |
Functions | |
unsigned int | LCBD_rst_handler_create (LCBD lcb, int priority) |
Creates the result service task. | |
unsigned int | LCBD_rst_null_cb_set (LCBD lcb, LCBD_rst_null_cb cb, void *prm) |
Establish callback for handling null result descriptors. | |
LCBD_rst_null_cbp | LCBD_rst_null_cbp_get (LCBD lcb) |
Returns the callback routine for the null result descriptor handler plus its parameter. | |
unsigned int | LCBD_rst_que_install (LCBD lcb, FORK_que *que) |
Installs queue from fcb as the ISR -> task message queue for result traffic. | |
unsigned int | LCBD_rst_rcv_err_map (unsigned int err) |
Maps a receive error to a standard LCB message code. | |
unsigned int | LCBD_rst_xfr_err_map (unsigned int err) |
Maps a generalize result error to a standard LCB message code. | |
LCBD_cl * | LCBD_cl_alloc (unsigned int nbytes) |
Allocates an LCBD command list for the specified number of bytes. | |
LCBD_rl * | LCBD_rl_alloc (unsigned int nbytes) |
Allocates an LCBD result list for the specified number of bytes. | |
LCBD_cl * | LCBD_cl_alloc8 (unsigned int n8bytes) |
Allocates an LCBD command list consisting of n8bytes of command items. This routine adds on any overhead above the command list items. | |
LCBD_rl * | LCBD_rl_alloc8 (unsigned int n8bytes) |
Allocates an LCBD result list consisting of n8bytes of result items. This routine adds on the overhead to the request. | |
__inline unsigned short int | LCBD__cl_len (unsigned int nbytes) |
Calculates the number of 8-byte cells in the specified number of bytes. | |
__inline unsigned short int | LCBD__cl_dlen (const void *beg, const void *end) |
Calculates the length, in 8-byte cells, between the specified beginning and ending pointers. | |
__inline unsigned short int | LCBD__rl_len (unsigned int nbytes) |
Calculates the number of 8-byte cells in the specified number of bytes. | |
__inline unsigned short int | LCBD__rl_dlen (const void *beg, const void *end) |
Calculates the length, in 8-byte cells, between the specified beginning and ending pointers. | |
LCBD_xcb * | LCBD_bind (const LCBD lcb, unsigned short int clLen, LCBD_cl *cl, unsigned short int rlLen, LCBD_rl *rl, LCBD_rst_cb cb, void *prm, void *user0, void *user1, void *user2, void *user3) |
Binds the XCB with everything needed to submit it to the LCB. | |
unsigned int | LCBD_qioW (LCBD lcb, unsigned short int clLen, LCBD_cl *cl, LCBD_rl *rl) |
A convenience routine to synchronously submit, execute and wait for the completion of the specified command list.. | |
unsigned int | LCBD_submit (LCBD_xcb *xcb) |
Submits the command request. | |
unsigned int | LCBD_submitW (LCBD_xcb *xcb) |
Submits the command request and waits for completion. | |
LCBD_xcb * | LCBD_fork_bind (LCBD lcb, unsigned short int clLen, LCBD_cl *cl, unsigned short int rlLen, LCBD_rl *rl, FORK_que *que, FORK_cb_rtn rtn, void *user0, void *user1, void *user2, void *user3) |
Completes a transaction block using the FORK dispatch routines as the synchronization mechanism. | |
LCBD_xcb * | LCBD_post_bind (LCBD lcb, unsigned short int clLen, LCBD_cl *cl, unsigned short int rlLen, LCBD_rl *rl, LCBD_post_head *head, void *user0, void *user1, void *user2, void *user3) |
Completes a transaction block that uses a queue as the synchronization mechanism. | |
unsigned int | LCBD_post_create (LCBD_post_head *head) |
Creates and initializes the head of the list that the LCBD_post routines use. | |
unsigned int | LCBD_post_destroy (LCBD_post_head *head) |
Destroys the head of the list created by LCBD_post_create. | |
LCBD_xcb * | LCBD_post_pendW (LCBD_post_head *head) |
Removes, with a wait, the next XCB posted to the indicated list head. |
JJRussell -- russell@slac.stanford.edu
CVS $Id
Where possible, the naming convention was used.
|
Composes a command list export descriptor.
|
|
Replaces the length field in the specified export descriptor.
|
|
Instructs the result service task creation routine LCBD_rst_handler_create to use a system defined default priority.
|
|
Driver supplied callback routine for LCBD result processing.
|
|
Typedef for enum _LCBD_RST_FATE_M.
|
|
Typedef for LCBD NULL descriptor handling callback routine.
|
|
Typedef for enum _LCBD_SEQ. The LCBD driver keeps track of command list transactions as they are submitted to the hardware. The LCBD driver expects that the hardware maintains a FIFO discipline, that is transaction are retired in the order they are submitted. LCBD_SEQ enumerates the 3 possible scenerios when a result from the RESULT queue is being processed
|
|
Typedef for struct _LCBD_xcb.
|
|
Typedef for union _LCBD_xcb_que.
|
|
Typedef for struct _LCBD_xcb_sys.
|
|
Typedef for struct _LCBD_xcb_usr.
|
|
Bit masks defining the options available on the return values of the result callback routine.
|
|
Enumerates the sequencing status of command lists.
|
|
Calculates the length, in 8-byte cells, between the specified beginning and ending pointers.
|
|
Calculates the number of 8-byte cells in the specified number of bytes.
|
|
Calculates the length, in 8-byte cells, between the specified beginning and ending pointers.
|
|
Calculates the number of 8-byte cells in the specified number of bytes.
|
|
Binds the XCB with everything needed to submit it to the LCB.
|
|
Allocates an LCBD command list for the specified number of bytes.
typedef struct _RequestCsrStallFaults { LCB_cl_dsc dsc; // Result list descriptor LCB_ci_csr csr; // Result item for CSR access LCB_ci_mark_time stall; // Result item a mark time command LCB_ci_faults faults; // Result list for FAULT register access } RequestCsrStallFaults; LCBC_cl = LCBD_cl_alloc (sizeof (RequestCsrStallFaults); |
|
Allocates an LCBD command list consisting of n8bytes of command items. This routine adds on any overhead above the command list items.
LCBD_cl *cl; // Generic command list LCBD_ci *ci; // Generic command item cl = LCBD_cl_alloc8 (n_8byte_cells); // Need @e n 8 byte cells ci = &cl->cl.ci; // Locate the first command item fill (ci...) // Start filling them |
|
Completes a transaction block using the FORK dispatch routines as the synchronization mechanism.
|
Here is the call graph for this function:
|
Completes a transaction block that uses a queue as the synchronization mechanism.
|
Here is the call graph for this function:
|
Creates and initializes the head of the list that the LCBD_post routines use.
|
|
Destroys the head of the list created by LCBD_post_create.
|
|
Removes, with a wait, the next XCB posted to the indicated list head.
|
|
A convenience routine to synchronously submit, execute and wait for the completion of the specified command list..
|
Here is the call graph for this function:
|
Allocates an LCBD result list for the specified number of bytes.
typedef struct _ResultCsrStallFaults { LCBD_xcb xcb; // Include the transaction control block LCB_rl_hdr hdr; // Result list header LCB_ri_csr csr; // Result item for CSR access LCB_ri_mark_time stall; // Result item a mark time command LCB_ri_faults faults; // Result list for FAULT register access } ResultCsrStallFaults; LCBC_rl *rl = LCBD_rl_alloc (sizeof (ResultCsrStallFaults); |
|
Allocates an LCBD result list consisting of n8bytes of result items. This routine adds on the overhead to the request.
LCBD_cl *rl; // Generic command list LCBD_ci *ri; // Generic command item rl = LCBD_rl_alloc8 (n_8byte_cells); // Need @e n 8 byte cells ri = &rl->rl.ri; // Locate the first command item fill (ci...) // Start filling them |
|
Creates the result service task.
|
Here is the call graph for this function:
|
Establish callback for handling null result descriptors.
|
|
Returns the callback routine for the null result descriptor handler plus its parameter.
|
|
Installs queue from fcb as the ISR -> task message queue for result traffic.
|
|
Maps a receive error to a standard LCB message code.
|
|
Maps a generalize result error to a standard LCB message code.
|
|
Submits the command request.
|
Here is the call graph for this function:
|
Submits the command request and waits for completion.
|
Here is the call graph for this function: