GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / V1-0-4 > attstream / rhel6-64
Typedefs | |
typedef enum _ATT_STREAM_TYPE_K | ATT_STREAM_TYPE_K |
Standard typedef for _enum ATT_STREAM_TYPE_K. | |
typedef enum _ATT_STREAM_TYPE_K | ATT_streamType |
Typedef for _enum ATT_STREAM_TYPE_K, used in procedure calls. | |
typedef enum _ATT_STREAM_UNIT_K | ATT_STREAM_UNIT_K |
Typedef for enum _ATT_STREAM_UNIT_K. | |
typedef enum _ATT_STREAM_UNIT_K | ATT_streamUnit |
Typedef for enum _ATT_streamUnit. | |
Enumerations | |
enum | _ATT_STREAM_TYPE_K { ATT_STREAM_TYPE_K_FILE = 0, ATT_STREAM_TYPE_K_DATA = 1, ATT_STREAM_TYPE_K_FILESEG = 2 } |
enum | _ATT_STREAM_UNIT_K { ATT_STREAM_UNIT_K_PKTS = 0, ATT_STREAM_UNIT_K_EVTS = 1 } |
Enumeration of how to treat the input stream, as packets or events. More... | |
enum | _ATT_STREAM_PKT_SIZE_K_MAX { ATT_STREAM_PKT_SIZE_K_MAX = -1, ATT_STREAM_PKT_SIZE_K_DEF = 0 } |
Enumerates the sentinal values used when specifying a packet size. More... | |
Functions | |
ATT_stream * | ATT_streamOpen (ATT_streamType type, const void *name, int segment) |
Opens a ATT file or data for reading. | |
int | ATT_streamRead (ATT_stream *stream) |
Reads the ATT file associated with the event stream handle istream. | |
const ATT_dgm * | ATT_streamLocate (ATT_stream *stream, int advance) |
Returns a pointer to the current packet and, optionally, advances the current packet to the next packet. | |
const ATT_attitude * | ATT_streamAttNext (ATT_stream *stream) |
Returns a pointer to the next attitude record or NULL if exhausted. | |
ATT_stream * | ATT_streamCreate (ATT_streamType type, const char *name, int rsvd_mbz) |
Creates a file to receive the ATT data packets. | |
int | ATT_streamDbgWrite (ATT_stream *stream, const ATT_dgm *dgm) |
int | ATT_streamClose (ATT_stream *stream) |
Closes the file after it has been read. | |
int | ATT_streamFree (ATT_stream *stream) |
Frees the memory associated with the contents of the file. | |
Variables | |
enum _ATT_STREAM_PKT_SIZE_K_MAX | ATT_STREAM_PKT_SIZE_K |
CVS $Id: ATT_stream.h,v 1.1 2007/07/05 22:14:45 russell Exp $
enum _ATT_STREAM_TYPE_K |
enum _ATT_STREAM_UNIT_K |
const ATT_attitude * ATT_streamAttNext | ( | ATT_stream * | stream | ) |
Returns a pointer to the next attitude record or NULL if exhausted.
stream | The attitude stream |
References ATT_streamLocate(), _ATT_stream::bdy, _ATT_streamBody::in, _ATT_istreamBody::lst_att, and _ATT_istreamBody::nxt_att.
int ATT_streamClose | ( | ATT_stream * | stream | ) |
Closes the file after it has been read.
This function only closes the file after its contents have been read into memory. To free the memory associated with the contents of the file, the user must call ATT_streamFree().
References _ATT_streamHeader::close, _ATT_stream::hdr, _streamCloseCbp::prm, and _streamCloseCbp::rtn.
ATT_stream * ATT_streamCreate | ( | ATT_streamType | type, | |
const char * | name, | |||
int | rsvd_mbz | |||
) |
Creates a file to receive the ATT data packets.
type | The type of stream to open ATT_STREAM_TYPE_K_FILE or ATT_STREAM_TYPE_K_DATA | |
name | The name of the section or file to create | |
rsvd_mbz | Reserved, must be 0 |
References ATT_STREAM_DIR_K_WRITE, ATT_STREAM_TYPE_K_DATA, ATT_STREAM_TYPE_K_FILE, _ATT_stream::bdy, _ATT_streamHeader::close, _ATT_streamHeader::dir, _ATT_ostreamBody::file, _ATT_streamHeader::free, _ATT_stream::hdr, mem_alloc(), _ATT_ostreamBody::name, _ATT_streamBody::out, _streamCloseCbp::prm, _streamCloseCbp::rtn, and _ATT_streamHeader::type.
int ATT_streamFree | ( | ATT_stream * | stream | ) |
Frees the memory associated with the contents of the file.
stream | The event builder stream handle |
References _ATT_streamHeader::free, _ATT_stream::hdr, and mem_free().
const ATT_dgm * ATT_streamLocate | ( | ATT_stream * | stream, | |
int | advance | |||
) |
Returns a pointer to the current packet and, optionally, advances the current packet to the next packet.
stream | The stream handle | |
advance | If non-zero, advance to the internal next packet pointer to the next packet. This is the normal way one would serially read a file of packets |
References ATT__dgmNext(), _ATT_ctbbdy::attitude, _ATT_ctb::bdy, _ATT_stream::bdy, _ATT_dgm::ctb, _ATT_istreamBody::cur_dgm, dgm_swap(), _ATT_streamBody::in, _ATT_istreamBody::lst_att, _ATT_istreamBody::lst_dgm, and _ATT_istreamBody::nxt_att.
Referenced by ATT_streamAttNext().
ATT_stream * ATT_streamOpen | ( | ATT_streamType | type, | |
const void * | name, | |||
int | segment | |||
) |
Opens a ATT file or data for reading.
type | The type of stream to open
| |
name | The name of the ATT file or the address of data section to open | |
segment | Interpretation is dependent on type. If type is
|
References ATT_STREAM_TYPE_K_DATA, ATT_STREAM_TYPE_K_FILE, ATT_STREAM_TYPE_K_FILESEG, fileOpen(), and map().
int ATT_streamRead | ( | ATT_stream * | stream | ) |
Reads the ATT file associated with the event stream handle istream.
stream | A previously opened event builder stream handle |
0,if | successful | |
-1,if | not |
References ATT_STREAM_TYPE_K_FILE, _ATT_stream::bdy, _ATT_istreamBody::buf, _ATT_istreamBody::cur_dgm, fileRead(), _ATT_stream::hdr, _ATT_streamBody::in, _ATT_istreamBody::lst_dgm, _ATT_istreamBody::seg_size, and _ATT_streamHeader::type.