GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / V1-22-4 > lim / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LIM_mode.h File Reference

Interface to the functions found in LIM_mode.c. More...

#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.


Detailed Description

Interface to the functions found in LIM_mode.c.

**  CVS $Id: LIM_mode.h,v 1.20 2011/03/29 21:20:28 apw Exp $
**  

Function Documentation

unsigned int LIM_mode_delete ( LIM_Mode object_p  ) 

unsigned int LIM_mode_get_info ( LIM_Mode object_p,
LIM_Info info_p 
)

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.

Parameters:
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.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
object_p Pointer to LIM mode object.
pkt_send_p Pointer to packet sending object.
qitem_p Pointer to queue item.
Returns:
MSG code.

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.

Parameters:
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.
Returns:
MSG code.

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().


Generated on Wed Nov 21 21:17:40 2012 by  doxygen 1.5.8