GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / dev > latc_wb / mv2304
#include <record.h>
#include <enums_p.h>
#include <ITC/ITC_pubdefs.h>
#include <LSF/LSF.h>
Classes | |
struct | SSR_pkt |
State information used whilst constructing a datagram. More... | |
Defines | |
#define | LCI_CTB_TYPE(base_, type_) (base_ + type_) |
Caclulate the contribution type from the LAT component type and the contribution class. | |
Functions | |
void | initPkt (SSR_pkt *pkt, FPA_fcb *fpa) |
Get a new packet and fill in the header information. | |
unsigned | sendPkt (SSR_pkt *pkt, FPA_fcb *fpa) |
Hand the datagram off to ITC for transmission to the SSR. | |
unsigned | startCtb (SSR_pkt *pkt, FPA_fcb *fpa, size_t size, unsigned type) |
Start a new contribution by inserting a new contribution header, possibly after sending out the current packet and starting a new one if there is insufficient space in the current datagram for the new contribution. | |
void | endCtb (SSR_pkt *pkt) |
Finish off the contribution by padding to the next 32 bit boundary and updating all the contribution and datagram length fields. | |
void | addData (SSR_pkt *pkt, void *data, size_t size) |
Copy a chunk of data into the datagram. | |
void | LATC_cb_dgmFree (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
Completion call-back for use with ITC when sending out a datagram just returns the qitem to the pool. |
void addData | ( | SSR_pkt * | pkt, | |
void * | data, | |||
size_t | size | |||
) |
Copy a chunk of data into the datagram.
pkt | Pointer to the state information for the qitem | |
data | Pointer to the data to copy into the datagram | |
size | Size of the data (in bytes) to copy) |
References SSR_pkt::ctb_size, SSR_pkt::dat, SSR_pkt::pay_size, and SSR_pkt::rem.
Referenced by LATC_record().
void endCtb | ( | SSR_pkt * | pkt | ) |
Finish off the contribution by padding to the next 32 bit boundary and updating all the contribution and datagram length fields.
pkt | Pointer to the state information for the qitem |
References SSR_pkt::ctb, SSR_pkt::ctb_size, SSR_pkt::dat, SSR_pkt::dgm, SSR_pkt::pay_size, and SSR_pkt::rem.
Referenced by LATC_record().
void initPkt | ( | SSR_pkt * | pkt, | |
FPA_fcb * | fpa | |||
) |
Get a new packet and fill in the header information.
pkt | Pointer to the state information of this qitem | |
fpa | Pointer to the FPA that will provide the storage for this qitem |
References SSR_pkt::ccsds, SSR_pkt::dat, SSR_pkt::dgm, SSR_pkt::pay_size, SSR_pkt::qitem, and SSR_pkt::rem.
Referenced by LATC_record(), and startCtb().
void LATC_cb_dgmFree | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2, | |||
unsigned int | tx | |||
) |
Completion call-back for use with ITC when sending out a datagram just returns the qitem to the pool.
qitem | Queue item to be returned to the pool | |
status | Success or failure of the ITC delivery | |
prm0 | User defined parameter 0 (pointer to the FPM pool) | |
prm1 | User defined (NULL) | |
prm2 | User defined (NULL) | |
tx | Transmission status |
Referenced by sendPkt().
unsigned sendPkt | ( | SSR_pkt * | pkt, | |
FPA_fcb * | fpa | |||
) |
Hand the datagram off to ITC for transmission to the SSR.
pkt | Pointer to the state information for this qitem | |
fpa | Pointer to the fixed packet allocator that provides the storage for these packets |
References SSR_pkt::ccsds, SSR_pkt::dgm, LATC_cb_dgmFree(), SSR_pkt::pay_size, and SSR_pkt::qitem.
Referenced by LATC_record(), and startCtb().
unsigned startCtb | ( | SSR_pkt * | pkt, | |
FPA_fcb * | fpa, | |||
size_t | size, | |||
unsigned | type | |||
) |
Start a new contribution by inserting a new contribution header, possibly after sending out the current packet and starting a new one if there is insufficient space in the current datagram for the new contribution.
pkt | Pointer to the state information for the qitem | |
fpa | Pointer to the fixed packet allocator that provides the storage for these packets | |
size | Size of the contribution (less header) in bytes | |
type | Contribution type ID (a combination of the contribution class - map or data - and component type) |
References SSR_pkt::ctb, SSR_pkt::ctb_size, SSR_pkt::dat, initPkt(), SSR_pkt::pay_size, SSR_pkt::qitem, SSR_pkt::rem, and sendPkt().
Referenced by LATC_record().