GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-6-3
Constituent: qsd     Tag: sun-gcc
#include "QSE/CCSDS_istream.h"
#include "QSE/CCSDS_apidDsc.h"
#include "CCSDS/CCSDS_pkt.h"
#include "MSG/MSG_macdefs.h"
#include "PBS/BSWP.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include <sys/time.h>
Include dependency graph for CCSDS_istream.c:
Data Structures | |
struct | _CCSDS_istreamInput |
Function callbacks to read and close an input stream. More... | |
struct | _CCSDS_istream |
The control structure/context for reading a CCSDS formatted stream of bytes. More... | |
Defines | |
#define | CCSDS_M_SEQ 0x3fff |
Mask of the valid bits in the CCSDS sequence number. | |
#define | SA_UTB_OFFSET 0x3a4fc880 |
The offset between Spectrum-Astro Epoch and UTB. | |
Typedefs | |
typedef _CCSDS_istreamInput | CCSDS_istreamInput |
Typedef for struct _CCSDS_istreamInput. | |
Functions | |
static __inline void | swapToBig (unsigned int *a32, int n32) |
Halfword swaps the specified number of 32-bit integers to big endian representation. This is a NOOP on big endian machines. | |
static int __inline | form_transition (unsigned int siv, unsigned short int flags) |
Forms the new state transition word. This consists of 2 bits defining the previous packet state (ONLY, FIRST, MIDDLE, LAST) and 2 bits defining the current packet state. | |
static int __inline | check_transition (unsigned int state) |
Checks that the transition from the previous state to the current state is allowed. | |
static int | file_read (FILE *file, unsigned char *buf, int nbytes, int pbytes) |
Simple routine to do a file read using fread. | |
static CCSDS_istream * | construct (CCSDS_istream *istream, int free) |
Construct for a newly minted CCSDS_istream structure. | |
int | CCSDS_istreamSizeof (void) |
Returns the size, in bytes, of a CCSDS_istream structure. | |
CCSDS_istream * | CCSDS_istreamNew (void) |
Convenience function to allocate and initialize a CCSDS_istream control structure. | |
int | CCSDS_istreamConstruct (CCSDS_istream *istream) |
Constructs (initializes) a previously uninitialized CCSDS_istream control structure. | |
int | CCSDS_istreamConnect (CCSDS_istream *istream, void *prm, CCSDS_istreamReader read, CCSDS_istreamCloser close, CCSDS_istreamTeller tell) |
Connects a read mechanism with the specified stream. | |
int | CCSDS_istreamHdrRead (CCSDS_istream *istream, CCSDS_istreamHdr *hdr) |
Reads the CCSDS header. | |
int | CCSDS_istreamDatRead (CCSDS_istream *istream, const CCSDS_istreamHdr *hdr, CCSDS_apidDsc *dsc) |
Reads the current CCSDS data payload into the buffer specified by dsc. | |
int | CCSDS_istreamFileOpen (CCSDS_istream *istream, const char *filename, unsigned int options, unsigned char *buf, unsigned int buf_size) |
Convenience function to construct a CCSDS_istream to read from the specified named file filename. | |
unsigned int | CCSDS_istreamTell (const CCSDS_istream *istream) |
Returns the current byte offset into the stream. | |
int | CCSDS_istreamClose (CCSDS_istream *istream) |
Closes the input stream associated with istream. | |
int | CCSDS_istreamDestroy (CCSDS_istream *istream) |
Destroys (i.e. returns the resources) associated with the stream. | |
void | CCSDS_istreamHdrPrint (const CCSDS_istreamHdr *hdr) |
Prints a one-line summary of the CCSDS_istream header. |
CVS $Id: CCSDS_istream.c,v 1.7 2006/05/08 17:47:08 russell Exp $
|
The offset between Spectrum-Astro Epoch and UTB.
|
|
Closes the input stream associated with istream.
|
|
Connects a read mechanism with the specified stream.
|
|
Constructs (initializes) a previously uninitialized CCSDS_istream control structure.
|
|
Reads the current CCSDS data payload into the buffer specified by dsc.
|
|
Destroys (i.e. returns the resources) associated with the stream.
|
|
Convenience function to construct a CCSDS_istream to read from the specified named file filename.
|
|
Prints a one-line summary of the CCSDS_istream header.
|
|
Reads the CCSDS header.
|
|
Convenience function to allocate and initialize a CCSDS_istream control structure.
|
|
Returns the size, in bytes, of a CCSDS_istream structure.
|
|
Returns the current byte offset into the stream.
|
|
Checks that the transition from the previous state to the current state is allowed.
|
|
Construct for a newly minted CCSDS_istream structure.
|
|
Simple routine to do a file read using fread.
|
|
Forms the new state transition word. This consists of 2 bits defining the previous packet state (ONLY, FIRST, MIDDLE, LAST) and 2 bits defining the current packet state.
|
|
Halfword swaps the specified number of 32-bit integers to big endian representation. This is a NOOP on big endian machines.
|