GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBD / V1-4-1

Constituent: test_lcbb     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

test_lcbb.c File Reference

Unit test for the LCBB driver. More...

#include <stdio.h>
#include "PBS/BSWP.ih"
#include "PBS/PBS.h"
#include "PBS/L.h"
#include "PBS/TMR.h"
#include "PBS/MBA.h"
#include "LCBD/LCBB.h"
#include "LCBD/LCB_cr.h"
#include "ptd/lcb_display.h"

Include dependency graph for test_lcbb.c:


Data Structures

struct  _CTX
 The context/control block for this suite of tests. More...

Defines

#define PROTO   0
 The default protocol to send messages on.

Typedefs

typedef _CTX CTX
 Typedef for struct _CTX.

Functions

unsigned int test_lcbb_init (int src_board_id, int dst_board_id)
 Test suite initialization routine.
unsigned int test_lcbb_xtrace_show (void)
 Displays the contents of the LCBB trace buffer.
unsigned int test_lcbb_mark_time (int stall, int want_title)
 Tests the LCBB_mark_time function.
unsigned int test_lcbb_csr_read (void)
 Tests the LCBB_csr_access with parameters that just read the register.
unsigned int test_lcbb_faults_read (void)
 Tests the LCBB_faults_access with parameters that just read the register.
unsigned int test_lcbb_rxstats_read (void)
 Tests the LCBB_rxstats_access with parameters that just read the register.
unsigned int test_lcbb_pci_csr_read (void)
 Reads the PCI CSR.
unsigned int test_lcbb_pci_irq_read (void)
 Reads the PCI IRQ register.
unsigned int test_lcbb_pci_fab_read (void)
 Reads the PCI Fabric Select register.
unsigned int test_lcbb_send (int style, int n)
 Fills a buffer in the specified style for the specified number of items.
unsigned int test_lcbb_receive (void)
 Receives a previously sent message.
unsigned int test_lcbb_free1 (void)
 Frees the oldest message on the que.
unsigned int test_lcbb_free_all (void)
 Frees the all the messages on the que.
int main (int argc, char *argv[])
 The usual host main program.

Variables

CTX Ctx
 Static, global instance of the context/control block.

Detailed Description

Unit test for the LCBB driver.

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

Function Documentation

int main int  argc,
char *  argv[]
 

The usual host main program.

Parameters:
argc Unused
argv Unused

unsigned int test_lcbb_free1 void   ) 
 

Frees the oldest message on the que.

Return values:
0,if successful
-1,if no message to free
Returns:
The status code of LCBB_free

unsigned int test_lcbb_free_all void   ) 
 

Frees the all the messages on the que.

Returns:
The number of messages freed

unsigned int test_lcbb_init int  src_board_id,
int  dst_board_id
 

Test suite initialization routine.

Parameters:
src_board_id The board id of the host LCB, defaults to 3
dst_board_id the board id of the destination LCB, defaults to the src_board_id + the master off (0x20)

unsigned int test_lcbb_mark_time int  stall,
int  want_title
 

Tests the LCBB_mark_time function.

Parameters:
stall The stall time in 50 nsecs ticks
want_title Indicates that the title should/should not be displayed

unsigned int test_lcbb_send int  style,
int  n
 

Fills a buffer in the specified style for the specified number of items.

Parameters:
style The filling style
  • 0 = Incrementing byte fill
n The number of items to fill, style dependent


Generated on Tue Dec 13 22:00:36 2005 by  doxygen 1.4.4