GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSW / V1-0-0

Constituent: lsw     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LSW_snap.c File Reference

Facilities to snapshot a task trace buffer. More...

#include <string.h>
#include "PBS/FORK.h"
#include "PBS/RW.ih"
#include "PBS/WCT.h"
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_pubdefs.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "LSW/LSW_msgs.h"
#include "LSW_prvdefs.h"

Include dependency graph for LSW_snap.c:


Functions

static void forkSnapStack (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Service a request to take a trace buffer snapshot.
static void forkSnapTrace (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Service a request to take a trace buffer snapshot.
static char * formatHeader (char *qipay, unsigned int size, unsigned int apid, unsigned int typ, unsigned int ver)
 Format the header of a telemetry block.
static unsigned int sendCTDB (LSW_Control *lcb, TRC_ForkMsg *msg, ITC_QueueItem *qitem, char *qipay, unsigned int qilen)
 Send a snapshot to the CTDB bus (1553).
static unsigned int sendSDI (LSW_Control *lcb, TRC_ForkMsg *msg, ITC_QueueItem *qitem, char *qipay, unsigned int qilen)
 Send a snapshot to the science data interface.
static void sendSDI_cb (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 Clean up after sending a trace snapshot to the SDI.
FORK_cb_status LSW_forkSnap (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Service a request to take a snapshot.

Detailed Description

Facilities to snapshot a task trace buffer.

CVS $Id: LSW_snap.c,v 1.1 2006/12/20 01:25:28 apw Exp $
Author:
A.P.Waite
LSW_snap.c provides facilities to snapshot a trace buffer and have the result sent to either the CTDB or the SDI.

Function Documentation

static void forkSnapStack FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

Service a request to take a trace buffer snapshot.

forkSnap() services a request to take a trace buffer snapshot.

static void forkSnapTrace FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

Service a request to take a trace buffer snapshot.

forkSnap() services a request to take a trace buffer snapshot.

static char * formatHeader char *  qipay,
unsigned int  size,
unsigned int  apid,
unsigned int  typ,
unsigned int  ver
[static]
 

Format the header of a telemetry block.

Parameters:
qipay (in) Start of CCSDS header
size (in) Size of snapshot (just the data portion, in bytes)
apid (in) APID to place in CCSDS header
typ (in) Type of snapshot
ver (in) Format version of snapshot
Return values:
NULL Format failed
x Pointer to the snapshot contributor buffer
formatHeader() formats the header portions of a telemetry block. It assumes an SDI target, so the routine that sends the telemetry to the CTDB will have to do a little extra work on the CCSDS portion of the header.

FORK_cb_status LSW_forkSnap FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
 

Service a request to take a snapshot.

LSW_forkSnap() services a request to take a snapshot.

static unsigned int sendCTDB LSW_Control lcb,
TRC_ForkMsg *  msg,
ITC_QueueItem *  qitem,
char *  qipay,
unsigned int  qilen
[static]
 

Send a snapshot to the CTDB bus (1553).

Parameters:
lcb (in) The LSW control block
msg (in) An LSW specific fork message
qitem (in) Queue item to be sent to SDI
qipay (in) Pointer to queue item payload
qilen (in) Length of payload
sendCTDB() parcels up and sends a snapshot to the CTDB bus (1553).

static unsigned int sendSDI LSW_Control lcb,
TRC_ForkMsg *  msg,
ITC_QueueItem *  qitem,
char *  qipay,
unsigned int  qilen
[static]
 

Send a snapshot to the science data interface.

Parameters:
lcb (in) The LSW control block
msg (in) An LSW specific fork message
qitem (in) Queue item to be sent to SDI
qipay (in) Pointer to queue item payload
qilen (in) Length of payload
sendSDI() parcels up and sends a snapshot to the science data interface.

static void sendSDI_cb ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx
[static]
 

Clean up after sending a trace snapshot to the SDI.

Parameters:
qitem (in) Queue item
status (in) Status from ITC_send()
prm0 (in) User param 0 (LSW control block)
prm1 (in) User param 1 (fork message block)
prm2 (in) User param 2 (unused)
tx (in) Failure during send phase of ITC_send() (unused)
sendSDI_cb() is the callback routine that's called once the dump has been sent to the SDI.


Generated on Wed Dec 20 01:35:56 2006 by  doxygen 1.4.4