GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBD / V1-4-1
Constituent: lcbd     Tag: linux-gcc
#include "LCBD/LCBD_rst.h"
#include "LCBD/LCBD_cr.h"
#include "LCBD_p.h"
#include "LCBD/LCBD_msgs.h"
#include "PBS/L.ih"
#include "PBS/LI.ih"
#include "PBS/RW.ih"
#include "PBS/MBA.h"
#include "PBS/INT.ih"
Include dependency graph for LCBD_rst.c:
Data Structures | |
struct | _LCBD_rst_err_maps |
Maps to take a result transfer/receive error/status value, into a standard message code. More... | |
Typedefs | |
typedef _LCBD_rst_err_maps | LCBD_rst_err_maps |
Typedef for struct _LCBD_rst_err_maps. | |
Functions | |
static unsigned int | fork (void *que, LCBD_xcb *xcb) |
Simple dispatch routine to use a FORK to a user callback. | |
static unsigned int | post (void *head, LCBD_xcb *xcb) |
Simple dispatch routine to post a result. | |
static unsigned int | wake (TASK_block_handle tbh, LCBD_xcb *xcb) |
Simple synchronization callback. | |
static unsigned int | retire (LCBD_rst_ccb *ccb, LCBD_xcb *xcb) |
Returns the LCB request descriptor FIFO resource. | |
static int | submit (LCBD lcb, LCBD_xcb *xcb) |
Attempts to gain access to the LCB request descriptor FIFO and submit the command request. | |
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. | |
FORK_que * | LCBD_rst_que_get (LCBD lcb, int que_id) |
Returns a pointer to the result FORK que. This allows outside code to schedule work that is serialized with the event taking. | |
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_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_alloc (unsigned int nbytes) |
Allocates an LCBD result list for the specified number of bytes. | |
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. | |
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. | |
static __inline LCBD_xcb * | locate (unsigned int *rl) |
Given a result/response descriptor, locates the command request handle. | |
FORK_cb_status | lcbd_rst_handler (FORK_cb_prm parameter, FORK_msg_hdr *fork_msg) |
The main LCBD descriptor dispatching routine. | |
FORK_cb_status | lcbd_rst_flush_handler (FORK_cb_prm parameter, FORK_msg_hdr *fork_msg) |
The main LCBD descriptor dispatching routine. | |
Variables | |
static const LCBD_rst_err_maps | LCBD_Rst_Err_Maps |
Realization of the LCB result error to message code mapping arrays. |
JJRussell -- russell@slac.stanford.edu
CVS $Id
|
Simple dispatch routine to use a FORK to a user callback.
|
|
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.
|
|
Completes a transaction block that uses a queue as the synchronization mechanism.
|
|
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..
|
|
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 |
|
The main LCBD descriptor dispatching routine.
|
|
The main LCBD descriptor dispatching routine.
The msg parameter could be use to indicate who "tickled" the processing. The usual suspects are the ISR or a user. |
|
Creates the result service task.
|
|
Establish callback for handling null result descriptors.
|
|
Returns the callback routine for the null result descriptor handler plus its parameter.
|
|
Returns a pointer to the result FORK que. This allows outside code to schedule work that is serialized with the event taking.
|
|
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.
|
|
Submits the command request and waits for completion.
|
|
Given a result/response descriptor, locates the command request handle.
|
|
Simple dispatch routine to post a result.
|
|
Returns the LCB request descriptor FIFO resource.
|
|
Attempts to gain access to the LCB request descriptor FIFO and submit the command request.
This routine must be called in an interlocked context. |
|
Simple synchronization callback.
|