GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBD / V1-2-9

Constituent: test_lcbd     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LCBD_cr.h File Reference

Defines the command (request) and result lists needed by the LCBD driver for access to the LCB internal registers and functionality. More...

#include "LCBD/LCBD_rst.h"
#include "LCBD/LCB_cr.h"

Include dependency graph for LCBD_cr.h:

Include dependency graph

Data Structures

struct  _LCBD_cl
 Defines a all encompassing LCBD command list. More...

struct  _LCBD_rl
 Generic LCBD result list containing an LCBD_xcb prefix block and a union of all possible result list types. More...

struct  _LCBD_rl_cmd
 Defines a LCBD transmit command result list. More...

struct  _LCBD_rl_cmdr
 Defines a LCBD transmit command and wait on response result list. More...

struct  _LCBD_rl_reg
 Defines a LCBD a generic register access result list list. More...

struct  _LCBD_rl_simple
 Defines a LCBD simple response result list list. More...


Defines

#define LCBD_OK   0
 Success return code, note that this is not an LCBD message code, but may be used as one.


Typedefs

typedef LCB_cl_simple LCBD_cl_simple
 Defines a LCBD simple command list.

typedef LCB_cl_reg LCBD_cl_reg
 Defines a LCBD register access command list.

typedef LCB_cl_cmd LCBD_cl_cmd
 Defines a LCBD transmit command command list.

typedef LCB_cl_mark_time LCBD_cl_mark_time
 Defines a LCBD mark time command list.

typedef LCB_cl_event LCBD_cl_event
 Defines a LCBD transfer event command list.

typedef LCB_cl_cmdr LCBD_cl_cmdr
 Defines a LCBD transfer command and wait on response command list.

typedef LCB_cl_lat_reset LCBD_cl_lat_reset
 Defines a LCBD lat reset command list.

typedef LCB_cl_csr LCBD_cl_csr
 Defines a LCBD access CSR register command list.

typedef LCB_cl_faults LCBD_cl_faults
 Defines a LCBD accesss FIFO FAULTS register command list.

typedef LCB_cl LCBD_cl
 Typedef for struct _LCBD_cl.

typedef _LCBD_rl_simple LCBD_rl_simple
 Typedef for a LCBD simple response result list.

typedef _LCBD_rl_reg LCBD_rl_reg
 Typedef for a LCBD generic register access result list.

typedef _LCBD_rl_cmd LCBD_rl_cmd
 Typedef for a LCBD transmit command result list.

typedef _LCBD_rl_cmdr LCBD_rl_cmdr
 Typedef for a LCBD transmit command and wait on response result list.

typedef LCBD_rl_simple LCBD_rl_mark_time
 Defines a LCBD mark time result list.

typedef LCBD_rl_simple LCBD_rl_event
 Defines a LCBD transmit event result list.

typedef LCBD_rl_simple LCBD_rl_lat_reset
 Defines a LCBD lat reset result list.

typedef LCBD_rl_reg LCBD_rl_csr
 Defines a LCBD access CSR register result list.

typedef LCBD_rl_reg LCBD_rl_faults
 Defines a LCBD access FIFO FAULTS register result list.

typedef _LCBD_rl LCBD_rl
 Typedef for struct _LCBD_rl.


Detailed Description

Defines the command (request) and result lists needed by the LCBD driver for access to the LCB internal registers and functionality.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id

OVERVIEW
This defines C structures and constants to be used by the driver accessing the LATp side registers and functionality. This data structures in this file parallel those in LCB_cr.h, but are agumented by information the driver needs to managed the bare LCB command and result lists. Note that command items and result items are really part of the LCB hardware and must be used as is.
COMMAND LISTS
Currently the command (request) list are exactly the same, but that is not guarantee to that the will stay the same in the future.
RESULT LISTS
The result list must be augmented by an additional block. This block is used by the driver to shuffle context from the queing side of the IO request to the result handling side. For example, the user's callback routine and callback parameter are stored in here. For the most part the user never needs to access members of this structure (called the LCBD_xcb, i.e. the LCBD extend context block). Mainly it is included here for compile time sizing reasons. This structure consists of a private piece, which the user is forbidden from manipulating (in C++ this would truly be a private member), and a more public piece, the LCB_iocb, which thhe savvy user may manipulate, but is discouraged from doing so. Rather, he should use one of the interface routines, e.g. LCBD_compile.
USER BUILT LISTS
The lists in this file are only single item lists. They are defined for convenience, but are of limited use, i.e. only in those cases where a single item is being queued to the LCB. The user may define his own strucures for more complicated list. Command lists are built by prefixing the list of command items with a single unsigned int used to hold the result link. Result lists are built by prefixing the list of result items with an LCBD_xcb structure and 1 unsigned int used to hold the request (command) link.
For example to define a command list and result list to access all three registers

     typedef struct _AccessAllRegsCl
     {
        unsigned int   result;   / *!< Result list link           * /
        LCBD_ci_csr       csr;   / *!< Access the CSR    register * /
        LCBD_ci_faults faults;   / *!< Access the FAULTS register * /
     }
     _AccessAllRegsCl;

    typedef struct _AccessAllRegsRl
    {
        LCBD_xcb          xcb;   / *!< The extended context block * /
        LCB_rl_hdr        hdr;   / *!< Request list header        * /
        LCB_ri_csr        csr;   / *!< Access CSR    result item  * /
        LCB_ri_faults  faults;   / *!< Access FAULTS result item  * /
    }
    AccessAllRegsRl;

Typedef Documentation

LCBD_cl
 

Typedef for struct _LCBD_cl.

Currently this is the same as an LCB_cl, but this tactic of defining a seemingly useless structure offers two advantages

  1. It makes the naming consistent, that is LCBD routines accept LCBD structures, not hardware native structures
  2. It allows for future expansion of the LCBD command list to include other things with only a recompile of the code by most users.

LCBD_cl_simple
 

Defines a LCBD simple command list.

A simple command list is one which returns a single bare response item


Generated on Wed May 4 20:39:41 2005 by doxygen 1.3.3