GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBT / dev

Constituent: ssrsimOld     Tag: linux-gcc


Interface   Compound List   File List   Compound Members   File Members  

SSRSIM.c File Reference

Module to simulated SSR data output from ISIS. More...

#include "PBS/PBS.h"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/WUT.h"
#include "PBS/TMR.h"
#include "PBS/QI.h"
#include "PBS/FORK.h"
#include "PBS/SPIN.h"
#include "PBS/TASK.h"
#include "LCB/LCB.h"
#include "LCB/LCB_init.h"
#include "LCB/LCB_dispatch.h"
#include "LCB/LCB_pci.h"
#include "LCB/LCB_io.h"
#include "LCB/LCB_err.h"
#include "LCB/LCB_latp.h"
#include "LCB/LCB_stats.h"
#include "LCB/LCB_bulk.h"
#include "LCB/LCB_bulk_def.h"
#include "LCB/LIOX.h"
#include "LCB/LIOX_addr.h"
#include "LCB/LIOX_addr_def.h"
#include "LCB/LIOX_cmd.h"
#include "LCB/LIOX_init.h"
#include "LCB/LIOX_rst.h"
#include "LCB/LIOX_sync.h"
#include "LCB/LIOX_sys.h"
#include "LCB/LIOX_util.h"
#include "SSRSIM.h"
#include "RND.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

Include dependency graph for SSRSIM.c:

Include dependency graph

Functions

void SSRSIM_init (xLCBx lcb, int sendTaskPri, int latpAddr, int proto)
 init the SSR simulate module

void SSRSIM_release ()
 shutdown the SSR simulate module

int SSRSIM_setParm (TDATA_DTEST dataType, int dataParm, int tDuration, int reqPacketSize32, int evtPeriod, int *actualPacketSize32)
 Setup and start data simulated SSR data from ISIS.

void SSRSIM_stop ()
 stop SSR simulate data output

void SSRSIM_stats ()
 print stats

void SSRSIM_statsReset ()
 reset stats for printing


Detailed Description

Module to simulated SSR data output from ISIS.

Author:
Ed Bacho -- ebacho@slac.stanford.edu
Basic algorithm:

To start: Pulls all buffs from Freelist (FPA), sends buff to fork task Forktask load up buffs with data and put in ReadyList QUE Enable timer, if < 1 KHz datarate timer determined by datarate, one event per dma if > 1 KHz datarate time is 1 mSec, each DMA has N events To Stop: Disable timer Pull all buffers from the ReadyList QUE and puts back in Freelist (FPA)

Normal Operation Timer - runs every N milliSec, pulls buff from ReadyList and sends to LCB LcbRstCallback - when LCB finishes, buffer is send to fork task ForkTask - fills buffer with new data and puts it in ReadyList


Function Documentation

SSRSIM_init xLCBx  lcb,
int  sendTaskPri,
int  latpAddr,
int  proto
 

init the SSR simulate module

Parameters:
lcb LCB handle
sendTaskPri priority of task created to send data to LCB
latpAddr address of unit to send data to
proto protocol number for event fabric
Returns:
none

Here is the call graph for this function:

SSRSIM_release  ) 
 

shutdown the SSR simulate module

Returns:
none

Here is the call graph for this function:

int SSRSIM_setParm TDATA_DTEST  dataType,
int  dataParm,
int  tDuration,
int  reqPacketSize32,
int  evtPeriod,
int *  actualPacketSize32
 

Setup and start data simulated SSR data from ISIS.

Parameters:
dataType data pattern to load into buffer
dataParm parameter associated with given dataType
tDuration time in secs to output data, -1=forever
reqPacketSize32 desired packet size, 8 to 1020, 0=random size
evtPeriod time in microSec between events, 100 (10KHz) to 30000000 (1/30 Hz)
actualPacketSize32 returned packet size adjusted down if needed to achieve given evtPeriod within LCB bandwidth constraints, average size is returned if reqPacketSIze=0 for random
Returns:
status 0=sucess

Here is the call graph for this function:

SSRSIM_stats  ) 
 

print stats

Returns:
none

SSRSIM_statsReset  ) 
 

reset stats for printing

Returns:
none

void SSRSIM_stop  ) 
 

stop SSR simulate data output

Returns:
none


Generated on Wed Sep 8 02:53:17 2004 by doxygen 1.3.3