GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / V1-22-4 > lim / mv2304
#include <ITC/ITC_pubdefs.h>
#include <LIM/LIM_pubdefs.h>
#include <LIM_DB/LIM_DB_schema.h>
#include <PIG/pig.h>
#include <LIM_action.h>
#include <LIM_pkt_send.h>
#include <LIM_task.h>
Typedefs | |
typedef struct _LIM_Mode | LIM_Mode |
Typedef for opaque LIM mode object handle. | |
Functions | |
unsigned int | LIM_mode_new (LIM_Mode **object_pp, LIM_Task *task_p, LIM_Pkt_Send *cal_start_p, LIM_Pkt_Send *cal_abort_p, LIM_Pkt_Send *diag_start_p, LIM_Pkt_Send *diag_abort_p, LIM_Pkt_Send *gbm_calcinfo_p, LIM_Pkt_Send *gbm_closeout_p, LIM_Pkt_Send *gbm_repoint_p, LIM_Pkt_Send *ltc_stop_p, LIM_Pkt_Send *physics_start_p, LIM_Pkt_Send *physics_stop_p, LIM_Pkt_Send *slew_req_cmd_p, LIM_Pkt_Send *slew_req_tlm_p, LIM_Pkt_Send *slew_rsp_tlm_p, LIM_Pkt_Send *shed_alert_tlm_p, LIM_Action *action_p, LIM_Pool *pool_p, const LIM_DB_Schema *db_p) |
Create and initialize a new mode object. | |
unsigned int | LIM_mode_delete (LIM_Mode *object_p) |
Shutdown and delete a mode object. | |
unsigned int | LIM_mode_get_info (LIM_Mode *object_p, LIM_Info *info_p) |
Return mode information. | |
unsigned int | LIM_mode_handle_bulk (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len) |
Handle messages arriving on the BULK queue. | |
unsigned int | LIM_mode_handle_cal_abort (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the Cal-Abort command. | |
unsigned int | LIM_mode_handle_cal_active (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle an 'active' calibration command. | |
unsigned int | LIM_mode_handle_cal_start (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the Cal-Start command. | |
unsigned int | LIM_mode_handle_diag_abort (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
unsigned int | LIM_mode_handle_diag_active (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
unsigned int | LIM_mode_handle_diag_start (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
unsigned int | LIM_mode_handle_gbm_calcinfo (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the GBM-Calcinfo command. | |
unsigned int | LIM_mode_handle_gbm_closeout (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the GBM-Closeout command. | |
unsigned int | LIM_mode_handle_gbm_repoint (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle a GBM-Repoint command. | |
unsigned int | LIM_mode_handle_physics_active (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle an 'active' physics command. | |
unsigned int | LIM_mode_handle_physics_idle (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle an 'idle' physics command. | |
unsigned int | LIM_mode_handle_physics_start (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the Physics-Start command. | |
unsigned int | LIM_mode_handle_physics_stop (LIM_Mode *object_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Handle the Physics-Stop command. |
** CVS $Id: LIM_mode.h,v 1.20 2011/03/29 21:20:28 apw Exp $ **
unsigned int LIM_mode_delete | ( | LIM_Mode * | object_p | ) |
Shutdown and delete a mode object.
object_p | Pointer to mode object. |
References _LIM_Mode::arr_p, _LIM_Mode::bulk_p, _LIM_Mode::gbm_p, _LIM_Mode::key, _LIM_Mode::lci_p, LIM_arr_delete(), LIM_bulk_delete(), LIM_gbm_delete(), LIM_lci_delete(), LIM_lpa_delete(), LIM_ltc_delete(), lim_mode_check(), LIM_sc_delete(), LIM_too_delete(), _LIM_Mode::lpa_p, _LIM_Mode::ltc_p, _LIM_Mode::sc_p, and _LIM_Mode::too_p.
Referenced by LIM_mode_new(), and LIM_shutdown().
Return mode information.
object_p | Pointer to LIM mode object. | |
info_p | Location to return mode information (must not be NULL). |
References _LIM_Info::arr_active, _LIM_Mode::arr_p, _LIM_Info::arr_ready, _LIM_Info::arr_remain_sec, _LIM_Mode::gbm_p, _LIM_Info::grb_state, _LIM_Mode::hv_allowed, _LIM_Info::hv_allowed, _LIM_Mode::lci_p, _LIM_Info::lci_state, _LIM_Info::ldf_state, LIM_arr_get_info(), LIM_arr_grb_state(), LIM_arr_is_ready(), LIM_gbm_get_info(), LIM_lci_get_state(), LIM_lpa_get_state(), lim_mode_check(), LIM_OP_MODE_ARR, LIM_OP_MODE_TOO, LIM_OTHER_STATE_IDLE, LIM_sc_remain_sec(), LIM_sc_rep_req_is_pending(), LIM_too_has_started(), LIM_too_is_ready(), LIM_too_remain_sec(), LIM_VIRT_MODE_IDLE, _LIM_Mode::lpa_p, _LIM_Info::lpa_state, _LIM_Mode::op_mode, _LIM_Info::op_mode, _LIM_Info::rep_req_pending, _LIM_Mode::saa_transit, _LIM_Info::saa_transit, _LIM_Mode::sc_p, _LIM_Info::too_active, _LIM_Mode::too_p, _LIM_Info::too_ready, _LIM_Info::too_remain_sec, _LIM_Info::too_started, and _LIM_Info::virt_mode.
Referenced by LIM_get_info().
unsigned int LIM_mode_handle_bulk | ( | void * | prm, | |
const ITC_QueueItem * | qitem_p, | |||
void * | pay_p, | |||
unsigned int | len | |||
) |
Handle messages arriving on the BULK queue.
prm | Pointer to a context parm (ptr to mode control object). | |
qitem_p | Pointer to queue item. | |
pay_p | Pointer to command payload. | |
len | Length of the command payload, in bytes. |
References _LIM_Mode::cal_start_p, lim_mode_check(), lim_mode_handle_bulk(), lim_mode_handle_cal_complete(), lim_mode_handle_lpa_bulk(), LIM_pkt_send_get_tid(), and _LIM_Mode::physics_start_p.
Referenced by LIM_mode_new().
unsigned int LIM_mode_handle_cal_abort | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the Cal-Abort command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References lim_mode_handle_command().
Referenced by LIM_intercept_cal().
unsigned int LIM_mode_handle_cal_active | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle an 'active' calibration command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References lim_mode_handle_command().
Referenced by LIM_intercept_cal().
unsigned int LIM_mode_handle_cal_start | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the Cal-Start command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References lim_mode_handle_command().
Referenced by LIM_intercept_cal().
unsigned int LIM_mode_handle_gbm_calcinfo | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the GBM-Calcinfo command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
2009-10-15 jgt If this command falls victim to a bad id check we want LIM to behave exactly as it always has, with the exception of rejecting the command. It turns out that occasionally, the GBM will send a second set of commands if it detects a new burst while the LAT is still in an ARR. In this case, the LAT is doing everything right, but by rejecting the commands we cause the FOT to be paged. In retrospect, the right thing to do is to accept the command, not process it, and print out a nastygram so that we know it happened.
References _Lim_Mode_Command::len, LIM_gbm_sizeof_calcinfo(), and lim_mode_handle_command().
Referenced by LIM_intercept_gbm().
unsigned int LIM_mode_handle_gbm_closeout | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the GBM-Closeout command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References _Lim_Mode_Command::len, LIM_gbm_sizeof_closeout(), and lim_mode_handle_command().
Referenced by LIM_intercept_gbm().
unsigned int LIM_mode_handle_gbm_repoint | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle a GBM-Repoint command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References _Lim_Mode_Command::len, LIM_gbm_sizeof_repoint(), and lim_mode_handle_command().
Referenced by LIM_intercept_gbm().
unsigned int LIM_mode_handle_physics_active | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle an 'active' physics command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References lim_mode_handle_command().
Referenced by LIM_intercept_physics().
unsigned int LIM_mode_handle_physics_idle | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle an 'idle' physics command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References lim_mode_handle_command().
Referenced by LIM_intercept_physics(), and LIM_intercept_physics_idle().
unsigned int LIM_mode_handle_physics_start | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the Physics-Start command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References _Lim_Mode_Command::len, LIM_lpa_sizeof_start(), and lim_mode_handle_command().
Referenced by LIM_intercept_physics().
unsigned int LIM_mode_handle_physics_stop | ( | LIM_Mode * | object_p, | |
LIM_Pkt_Send * | pkt_send_p, | |||
const ITC_QueueItem * | qitem_p | |||
) |
Handle the Physics-Stop command.
object_p | Pointer to LIM mode object. | |
pkt_send_p | Pointer to packet sending object. | |
qitem_p | Pointer to queue item. |
References _Lim_Mode_Command::len, LIM_lpa_sizeof_stop(), and lim_mode_handle_command().
Referenced by LIM_intercept_physics().
unsigned int LIM_mode_new | ( | LIM_Mode ** | object_pp, | |
LIM_Task * | task_p, | |||
LIM_Pkt_Send * | cal_start_p, | |||
LIM_Pkt_Send * | cal_abort_p, | |||
LIM_Pkt_Send * | diag_start_p, | |||
LIM_Pkt_Send * | diag_abort_p, | |||
LIM_Pkt_Send * | gbm_calcinfo_p, | |||
LIM_Pkt_Send * | gbm_closeout_p, | |||
LIM_Pkt_Send * | gbm_repoint_p, | |||
LIM_Pkt_Send * | ltc_stop_p, | |||
LIM_Pkt_Send * | physics_start_p, | |||
LIM_Pkt_Send * | physics_stop_p, | |||
LIM_Pkt_Send * | slew_req_cmd_p, | |||
LIM_Pkt_Send * | slew_req_tlm_p, | |||
LIM_Pkt_Send * | slew_rsp_tlm_p, | |||
LIM_Pkt_Send * | shed_alert_tlm_p, | |||
LIM_Action * | action_p, | |||
LIM_Pool * | pool_p, | |||
const LIM_DB_Schema * | db_p | |||
) |
Create and initialize a new mode object.
object_pp | Location to return pointer to new object. | |
task_p | Ptr to a task object. | |
cal_start_p | Ptr to a Cal-Start pkt sending obj. | |
cal_abort_p | Ptr to a Cal-Abort pkt sending obj. | |
diag_start_p | Ptr to a Diag-Start pkt sending obj. | |
diag_abort_p | Ptr to a Diag-Abort pkt sending obj. | |
gbm_calcinfo_p | Ptr to a GBM-Calcinfo pkt sending obj. | |
gbm_closeout_p | Ptr to a GBM-Closeout pkt sending obj. | |
gbm_repoint_p | Ptr to a GBM-Repoint pkt sending obj. | |
ltc_stop_p | Ptr to a LTC-Stop pkt sending obj. | |
physics_start_p | Ptr to a Physics-Start pkt sending obj. | |
physics_stop_p | Ptr to a Physics-Stop pkt sending obj. | |
slew_req_cmd_p | Ptr to a Slew-Request cmd pkt sending obj. | |
slew_req_tlm_p | Ptr to a Slew-Request tlm pkt sending obj. | |
slew_rsp_tlm_p | Ptr to a Slew-Request resp tlm pkt send obj. | |
shed_alert_tlm_p | Ptr to a Load-Shed-Alert tlm pkt send obj. | |
action_p | Ptr to an action object. | |
pool_p | Ptr to a packet pool object. | |
db_p | Pointer to configuration information. |
References _LIM_Mode::action_p, _LIM_Mode::arr_p, _LIM_Mode::bulk_p, _LIM_Mode::cal_start_p, _LIM_Mode::gbm_p, _LIM_Mode::hv_allowed, _LIM_Mode::key, _LIM_Mode::lci_p, LIM_Apid661, LIM_Apid662, LIM_Apid663, LIM_Apid664, LIM_arr_new(), LIM_bulk_new(), LIM_gbm_new(), LIM_lci_new(), LIM_LOAD_SHED_ALERT_TLM_APID, LIM_lpa_new(), LIM_ltc_new(), LIM_mode_delete(), LIM_mode_handle_bulk(), LIM_MODE_VALID_KEY, LIM_OP_MODE_TERMINAL, LIM_pkt_set_info(), LIM_sc_new(), LIM_task_add_apid(), LIM_task_add_raw(), LIM_too_new(), LIM_VIRT_MODE_IDLE, _LIM_Mode::lpa_p, _LIM_Mode::ltc_p, _LIM_Mode::op_mode, _LIM_Mode::physics_start_p, _LIM_Mode::pool_p, _LIM_Mode::saa_transit, _LIM_Mode::sc_p, _LIM_Mode::shed_alert_tlm_p, _LIM_Mode::task_p, _LIM_Mode::too_p, and _LIM_Mode::virt_mode.
Referenced by LIM_initialize().