GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> DUMP / dev > dump / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

dump.h File Reference

Framework used to parse the contents of a stream of datagrams. More...

#include <LSF/LSF_scan.h>
#include <stdlib.h>

Typedefs

typedef struct _ApidStream ApidStream
 APID stream structure typedef.
typedef LSF_scanContributionHandler DUMP_dgmHandler (ApidStream *stream, const LSF_datagram *dgm)
 Application specific datagram handler.

Functions

size_t DUMP_sizeofAstream (void)
 Return the size of the ApidStream structure.
ApidStreamDUMP_constructAstream (void *astream, unsigned int dgmid, unsigned short apid, unsigned char *dsc_buf, size_t buf_size, DUMP_dgmHandler *dgm_handler, void *rsrc)
 Construct an ApidStream structure using the resources provided.
void * DUMP_getResource (ApidStream *astream)
 Hand back the pointer to the application resources.
void DUMP_getTime (ApidStream *astream, unsigned int *secs, unsigned int *usecs)
 Get the packet time for the current datagram.
int DUMP_process (const char *file, int dmp_ccsds)
 Process a file of science datagrams.


Detailed Description

Framework used to parse the contents of a stream of datagrams.

Author:
James Swain & Owen Saxton
Id
dump.h,v 1.4 2011/03/28 19:01:45 saxton Exp

Function Documentation

ApidStream* DUMP_constructAstream ( void *  astream,
unsigned int  dgmid,
unsigned short  apid,
unsigned char *  dsc_buf,
size_t  buf_size,
DUMP_dgmHandler dgm_handler,
void *  rsrc 
)

Construct an ApidStream structure using the resources provided.

Parameters:
astream Pointer to the ApidStream structure.
dgmid The ID of the datagrams to process.
apid The Apid of the packets to process.
dsc_buf The address of the buffer to contain each complete datagram.
buf_size The size, in bytes, of the datagram buffer.
dgm_handler The address of the routine to be called to process each complete datagram.
rsrc Resource handle to be associated with the stream.
Returns:
Pointer to the constructed ApidStream structure

References _ApidStream::dgm_handler, _ApidStream::dgmid, _ApidStream::dsc, _ApidStream::dsc_buf, LL_registerNode(), _ApidStream::rsrc, _ApidStream::secs, and _ApidStream::usecs.

void* DUMP_getResource ( ApidStream astream  ) 

Hand back the pointer to the application resources.

Parameters:
astream Pointer to the ApidStream structure
Returns:
Pointer handed to DUMP when DUMP_constructAstream was invoked

References _ApidStream::rsrc.

void DUMP_getTime ( ApidStream astream,
unsigned int *  secs,
unsigned int *  usecs 
)

Get the packet time for the current datagram.

This routine returns the time fields from the last telemetry packet of the current datagram.

Parameters:
astream Pointer to the ApidStream structure.
secs The address of an integer to receive the seconds value.
usecs The address of an integer to receive the microseconds value.

References _ApidStream::secs, and _ApidStream::usecs.

int DUMP_process ( const char *  file,
int  dmp_ccsds 
)

Process a file of science datagrams.

Parameters:
file Name of the file to process
dmp_ccsds Flag indicating whether (1) or not (0) to print out the raw CCSDS
Return values:
0 Success
~0 Failure

References _ApidStream::dsc, LL_getPayload(), _ApidStream::secs, and _ApidStream::usecs.

size_t DUMP_sizeofAstream ( void   ) 

Return the size of the ApidStream structure.

Returns:
Size of the ApidStream structure


Generated on Mon Mar 28 12:08:20 2011 by  doxygen 1.5.8