GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCI / dev
Constituent: lci     Tag: mcp750
#include "LCI/LCI_msgs.h"
#include "LCI/LCI_cmddefs.h"
#include "LCI/LCI_cmdxtrn.h"
#include "control_p.h"
#include "collect.h"
#include "configure.h"
#include "consign.h"
#include "macros_p.h"
#include "CDM/CDM_pubdefs.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "EDS/EBF_match.h"
#include "EDS/EBF_cid.h"
#include "FBS/FBS_pubrtos.h"
#include "CCSDS/CCSDS_pkt.h"
#include "LCI_DB/schema.h"
#include "LSF/LSF_cpu.h"
#include "LSF/LSF_origin.h"
#include "LSF/LSF_reason.h"
#include "LSEC/compact.h"
#include "LATC/latc.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "PBS/BSWP.h"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include <string.h>
Include dependency graph for control.c:

Defines | |
| #define | FALSE 0 |
| FALSE defined to be 0. | |
| #define | TRUE 1 |
| TRUE defined to be 1. | |
| #define | CHECK_CALL_TERMINATE(FUNC) |
| Call a function and check the return value, calling LCI_terminate on error. | |
| #define | inline __inline |
Enumerations | |
| enum | { LCI_DIAG_APID = 0x2d8, LCI_DFT_CAPACITY = 100, LCI_N_TERM_PKTS = 2, CSR_STALL = 200 } |
Functions | |
| static unsigned | newITC (LCI_controller *cnt) |
| Allocate a new ITC structure. | |
| static void | deleteITC (LCI_controller *cnt) |
| Free the ITC structures. | |
| static unsigned | cycle (void) |
| Perform a calibration cycle. | |
| LCI_controller * | LCI_newController (unsigned cap, unsigned cpuid, unsigned srcid) |
| Create calibration controller structure. | |
| void | LCI_deleteController (LCI_controller *cnt) |
| Free the calibration controller structure. | |
| unsigned | LCI_initialise (void) |
| Initialize the calibration system from its config database. | |
| unsigned | LCI_init (unsigned capacity, unsigned cpuid, unsigned srcid) |
| Initialize the calibration system. | |
| unsigned | LCI_startTask (void) |
| Start the LCI task using its config database. | |
| unsigned | LCI_start (const TASK_attr *attr) |
| Start the LCI task. | |
| unsigned | LCI_stopTask (void) |
| Stop the LCI task. | |
| unsigned | LCI_teardown (void) |
| Tear down the calibraion system. | |
| unsigned | LCI_calibrate (unsigned latccfg, unsigned lcicfg, unsigned lcirunid, ITC_NodeID iniNode, ITC_TaskID iniTask, ITC_QueueID iniQueue) |
| Start a new calibration. | |
| void | LCI_abort (void) |
| Abort a calibration. | |
| unsigned | LCI_startCycle (void) |
| Request the next calibration cycle. | |
| unsigned int | LCI_cycle (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
| Perform a single calibration cycle. | |
| unsigned | LCI_terminate (unsigned status) |
| Terminate a calibration. | |
| void | LCI_cb_statusFree (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
| ITC send completion callback. | |
| unsigned | LCI_status (void) |
| Get the calibration state. | |
| unsigned | LCI_cycles (void) |
| Get the calibration cycle count. | |
| unsigned | LCI_getRunInfo (LCI_runInfo *info) |
| Get extended information about the calibration run. | |
| unsigned | LCI_sizeofRunInfo (void) |
| Get the size of the extended calibration run information. | |
| unsigned | LCI_monitor (unsigned mon) |
| Set the calibration monitoring level. | |
Variables | |
| static LCI_controller * | lci |
| Static pointer to the single LCI control block. | |
|
|
Value: { \
unsigned status = FUNC;\
if (_msg_failure(status)) return LCI_terminate(status);\
}
|
|
|
Perform a calibration cycle. This routine performs a configure-collect-compact-consign calibration cycle.
|
|
|
Free the ITC structures. This routine frees the ITC resource associated with an LCI structure.
|
|
|
Abort a calibration. This routine is called when an abort calibration telecommand is received. If the current state is calibrating, it changes the state to aborting |
|
||||||||||||||||||||||||||||
|
Start a new calibration. This routine is called when a start calibration telecommand is received. It first uses LATC to perform an initial LAT configuration then peforms a configure, collect, compact, consign cycle for each LCI configuration in the LCI file.
|
|
||||||||||||||||||||||||||||
|
ITC send completion callback. Completion call-back for use with ITC when sending the status back to the task that initiated calibration - just returns the qitem to the pool.
|
|
||||||||||||||||||||
|
Perform a single calibration cycle. This routine is called when a calibration cycle request is received. Provided there is configuration data to read and the abort flag has not been set, it performs a single calibration cycle and queues the next one if this one is successful.
|
|
|
Get the calibration cycle count. This rouine returns the number of cycles performed since the last calibration command was issued.
|
|
|
Free the calibration controller structure. This routine frees all the resources associated with the LCI task. |
|
|
Get extended information about the calibration run. This routine fills a block of information detailing the current state of calibration runs.
|
|
||||||||||||||||
|
Initialize the calibration system. This routine performs resource allocation, initializes the ITC message queues, and sets the state to INITIALISED.
|
|
|
Initialize the calibration system from its config database. This routine is normally called at system initialization time to initialize the calibration system . It uses a configuration database to supply the capacity, cpuid and srcid parameters.
|
|
|
Set the calibration monitoring level. This routine sets the LCI monitoring level and returns the old value.
|
|
||||||||||||||||
|
Create calibration controller structure. This routine allocates memory for an LCI_controller structure and all associated structures.
|
|
|
Get the size of the extended calibration run information. This routine returns the size of the area needed to hold the extended run information for the last calibration.
|
|
|
Start the LCI task. This routine starts the LCI task and waits for it be up and running before setting the state to WAITING.
|
|
|
Request the next calibration cycle. This routine is called whenever the next (or first) calibration cycle is to be performed. It puts an empty item to the LCI bulk queue to initiate the cycle. This indirection is needed to allow any abort requests to be processed in a timely manner.
|
|
|
Start the LCI task using its config database. This routine is normally called during system initialization. It starts the LCI task using the CPU configuration database to supply its attributes.
|
|
|
Get the calibration state. This routine returns the current state of LCI.
|
|
|
Stop the LCI task. This routine stops the LCI task and sets the state to INITIALISED.
|
|
|
Tear down the calibraion system. This routine frees all the resources associated with the LCI task.
|
|
|
Terminate a calibration. This routine finishes out the calibration by sending a status message back to the originating task and setting the state to WAITING.
|
|
|
Allocate a new ITC structure. This routine obtains the ITC resources needed by the calibration task.
|
1.4.4