GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSE / V1-3-6

Constituent: lsew_stream     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_ostream.h File Reference

Interface to the facility used to post an CCSDS to an output stream. More...

This graph shows which files directly or indirectly include this file:


Typedefs

typedef void *(* CCSDS_ostreamPoster )(void *prm, void *buf, int bytes)
 Callback signature to post a buffer.

Functions

CCSDS_ostreamCCSDS_ostreamNew (void)
 Allocates enough memory for, but does not initialize an CCSDS_ostream structure.
int CCSDS_ostreamDestroy (CCSDS_ostream *ostream)
 Frees any resources associated with the specified stream.
int CCSDS_ostreamSizeof (void)
 Returns the size, in bytes, of the CCSDS output stream control structure CCSDS_ostream.
void CCSDS_ostreamConstruct (CCSDS_ostream *ostream, CCSDS_ostreamPoster postRtn, void *postPrm, unsigned short int sequence, unsigned short int max_write)
 Constructs/Initializes the Post Control Block.
void * CCSDS_ostreamPost (CCSDS_ostream *ostream, void *buf, int nbytes)
 Routine to write the data to post the data. The buffer is broken in multiple CCSDS packets, with the size limited to 4096-128 bytes.

Detailed Description

Interface to the facility used to post an CCSDS to an output stream.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: CCSDS_ostream.h,v 1.2 2005/10/13 20:13:56 russell Exp $

Typedef Documentation

void *(* CCSDS_ostreamPoster)(void *prm, void *buf, int nbytes)
 

Callback signature to post a buffer.

Returns:
Pointer to the next buffer to be filled.
Parameters:
prm Arbitrary user context parameter
buf The buffer to post
nbytes The number of bytes in the buffer


Function Documentation

void CCSDS_ostreamConstruct CCSDS_ostream ostream,
CCSDS_ostreamPoster  postRtn,
void *  postPrm,
unsigned short int  sequence,
unsigned short int  max_write
 

Constructs/Initializes the Post Control Block.

Parameters:
ostream The output stream handle
postRtn The user provide physical posting routine
postPrm The user provide parameter to the post routine
sequence The starting CCSDS sequence number to use. This is almost always 0, but is provided as a parameter for testing purposes
max_write The maximum packet size to be written. This must be at least 32 (although why anyone would make it that small would be a mystery) and no bigger than 4096 - 32. If it is not a multiple of 16 bytes, it will be rounded up to the nearest 16 bytes boundary and then limited to the maximum of 4096 - 32.

int CCSDS_ostreamDestroy CCSDS_ostream ostream  ) 
 

Frees any resources associated with the specified stream.

Returns:
Status, currently always success (0)
Parameters:
ostream The output stream handle to destroy

CCSDS_ostream * CCSDS_ostreamNew void   ) 
 

Allocates enough memory for, but does not initialize an CCSDS_ostream structure.

Returns:
Pointer to the allocated CCSDS_ostream structure or NULL on failure.

void * CCSDS_ostreamPost CCSDS_ostream ostream,
void *  buf,
int  nbytes
 

Routine to write the data to post the data. The buffer is broken in multiple CCSDS packets, with the size limited to 4096-128 bytes.

Returns:
Pointer to the next buffer to be filled
Parameters:
ostream The output stream handle
buf The buffer to output
nbytes The size of the output buffer, in bytes.

int CCSDS_ostreamSizeof void   ) 
 

Returns the size, in bytes, of the CCSDS output stream control structure CCSDS_ostream.

Returns:
Size, in bytes, of the post control structure CCSDS_ostream


Generated on Wed Aug 27 01:34:54 2008 by  doxygen 1.4.4