GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-0 > lra / rad750
#include "LRA_p.h"
#include "LRA/LRA_telem.h"
#include "LRA/LRA_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/FPA.h"
#include "PBS/MTX.h"
#include "ITC/ITC_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include <string.h>
Functions | |
static unsigned | sendDiag (FPA_fcb *fcb, const LRA_regData *rData, unsigned size) |
Local routine to send data on the diagnostic stream. | |
static unsigned | sendSSR (FPA_fcb *fcb, int apId, int type, const char *data, unsigned size) |
Local routine to send data on the science stream. | |
static void | sendDone (ITC_QueueItem *qitem, unsigned status, void *prm0, void *prm1, void *prm2, unsigned tx) |
Local routine called after a packet has been sent. | |
unsigned | LRA_doSend (const LRA_regSpec *rSpec, int ssr) |
Send register data to the spacecraft. | |
unsigned | LRA_doSendEsr (void) |
Send ESR data to the spacecraft. | |
unsigned | LRA_doSendStats (void) |
Send statistics data to the spacecraft. |
The routines in this module read registers more-or-less directly and are executed within the LRA task.
$Id: LRA_send.c,v 1.5 2009/07/31 22:08:14 saxton Exp $
unsigned LRA_doSend | ( | const LRA_regSpec * | rSpec, | |
int | ssr | |||
) |
Send register data to the spacecraft.
This routine is called indirectly whenever a READ telecommand arrives. It calls the register read routine and sends back the status and register data.
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used. | |
ssr | If TRUE, the data is sent on the science stream, and can be maximum sized. Otherwise it is sent on the diagnostic stream, and is limited to 4 KBytes. |
LRA_SUCCESS | The registers were read and sent successfully | |
LRA_NOTINIT | LRA not initialized | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number | |
LRA_EXCSDATA | Too much data for the diagnostic stream | |
LCBD_RTOERR | Operation timed out | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |
unsigned LRA_doSendEsr | ( | void | ) |
Send ESR data to the spacecraft.
This routine reads the error and status register data and sends it to the spacecraft via the science stream.
LRA_SUCCESS | The registers were read and sent successfully | |
LRA_NOTINIT | LRA not initialized | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |
unsigned LRA_doSendStats | ( | void | ) |
Send statistics data to the spacecraft.
This routine sends the accumulated register statistics to the spacecraft via the science stream.
LRA_SUCCESS | The statistics were sent successfully | |
LRA_NOTINIT | LRA not initialized | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |
unsigned sendDiag | ( | FPA_fcb * | fcb, | |
const LRA_regData * | rData, | |||
unsigned | size | |||
) | [static] |
Local routine to send data on the diagnostic stream.
This routine sends register data on the diagnostic stream. It breaks the data into individual packets, inserting a sequence number at the beginning of each one followed by a copy of the register specification data.
fcb | The handle for the packet allocator. | |
rData | The register data to be sent. | |
size | The size of the register values, in bytes. |
LRA_SUCCESS | The data was sent successfully. | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |
void sendDone | ( | ITC_QueueItem * | qitem, | |
unsigned | status, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2, | |||
unsigned | tx | |||
) | [static] |
Local routine called after a packet has been sent.
This routine is called by ITC after a packet has been sent. It just returns the packet to the pool.
unsigned sendSSR | ( | FPA_fcb * | fcb, | |
int | apId, | |||
int | type, | |||
const char * | data, | |||
unsigned | size | |||
) | [static] |
Local routine to send data on the science stream.
This routine sends register data on the science stream. It breaks the data into individual datagrams, inserting an LSF header at the beginning of each one.
fcb | The handle for the packet allocator. | |
apId | The application ID to use. | |
type | The data type | |
data | The register data to be sent. | |
size | The size of the complete register data, in bytes. |
LRA_SUCCESS | The data was sent successfully. | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |