GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / V1-22-3 > lim / linux-gcc
#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LIM/LIM_msgs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <LIM_intercept.h>
#include <LIM_mode.h>
#include <LIM_pkt_send.h>
Classes | |
struct | _Lim_Apid |
Information about an intercepted APID. More... | |
struct | _Lim_Command |
Information about an intercepted command. More... | |
struct | _LIM_Intercept |
State information for an intercept object. More... | |
Defines | |
#define | LIM_INTERCEPT_VALID_KEY (('L'<<24)+('I'<<16)+('N'<<8)+'T') |
Value that indicates LIM intercept object state is valid. | |
#define | DIM(a) (sizeof (a) / sizeof ((a)[0])) |
Dimension of an array. | |
Typedefs | |
typedef unsigned int(* | Lim_Handler )(LIM_Mode *mode_p, LIM_Pkt_Send *pkt_send_p, const ITC_QueueItem *qitem_p) |
Signature of a command handler function. | |
typedef struct _Lim_Apid | Lim_Apid |
Typedef for _Lim_Apid. | |
typedef struct _Lim_Command | Lim_Command |
Typedef for _Lim_Command. | |
Functions | |
static unsigned int | lim_intercept_check (LIM_Intercept *object_p) |
Validate a LIM intercept object pointer. | |
static unsigned int | lim_intercept_dispatch (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len) |
Dispatch intercepted commands. | |
unsigned int | LIM_intercept_new (LIM_Intercept **object_pp, ITC_TaskID lim_tid, LIM_Mode *mode_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 *phys_start_p, LIM_Pkt_Send *phys_stop_p, LIM_Pkt_Send *phys_config_p, LIM_Pkt_Send *gbm_calcinfo_p, LIM_Pkt_Send *gbm_closeout_p, LIM_Pkt_Send *gbm_repoint_p) |
Create and initialize a new command intercept object. | |
unsigned int | LIM_intercept_delete (LIM_Intercept *object_p) |
Shutdown and delete a command intercept object. | |
static unsigned int | lim_intercept_apid (LIM_Intercept *object_p, LIM_Pool *pool_p, unsigned int apid, Lim_Apid **apid_info_pp) |
Intercept commands with the specified APID. | |
static unsigned int | lim_intercept_command (LIM_Intercept *object_p, Lim_Apid *apid_info_p, unsigned int func_code, LIM_Pkt_Send *pkt_send_p, Lim_Handler handler, char *desc) |
Intercept a specific command. | |
unsigned int | LIM_intercept_cal (LIM_Intercept *object_p, LIM_Pool *pool_p, unsigned int apid, int start_fc, int abort_fc) |
Intercept calibration commands. | |
unsigned int | LIM_intercept_physics (LIM_Intercept *object_p, LIM_Pool *pool_p, unsigned int apid, int start_fc, int stop_fc, int config_fc) |
Intercept physics commands. | |
unsigned int | LIM_intercept_physics_idle (LIM_Intercept *object_p, LIM_Pool *pool_p, unsigned int apid, int config_fc) |
Intercept physics commands that are valid when LPA is idle. | |
unsigned int | LIM_intercept_gbm (LIM_Intercept *object_p, LIM_Pool *pool_p, unsigned int apid, int calcinfo_fc, int closeout_fc, int repoint_fc) |
Intercept commands from the GBM. |
** CVS $Id: LIM_intercept.c,v 1.15 2011/03/29 21:20:28 apw Exp $ **
These are functions related to intercepting LCI, LDF, and LPA commands.
unsigned int lim_intercept_apid | ( | LIM_Intercept * | object_p, | |
LIM_Pool * | pool_p, | |||
unsigned int | apid, | |||
Lim_Apid ** | apid_info_pp | |||
) | [static] |
Intercept commands with the specified APID.
object_p | Pointer to intercept object. | |
pool_p | Pointer to memory pool object. | |
apid | APID to intercept. | |
apid_info_pp | Location to return pointer to APID information. |
References _Lim_Apid::apid, _LIM_Intercept::apid, DIM, LIM_pkt_send_new(), _LIM_Intercept::lim_tid, _Lim_Apid::orig_qid, _Lim_Apid::orig_tid, and _Lim_Apid::pkt_send_p.
Referenced by LIM_intercept_cal(), LIM_intercept_gbm(), LIM_intercept_physics(), and LIM_intercept_physics_idle().
unsigned int LIM_intercept_cal | ( | LIM_Intercept * | object_p, | |
LIM_Pool * | pool_p, | |||
unsigned int | apid, | |||
int | start_fc, | |||
int | abort_fc | |||
) |
Intercept calibration commands.
object_p | Pointer to LIM intercept object. | |
pool_p | Pointer to memory pool object. | |
apid | APID to intercept. | |
start_fc | Func code of Calibration-Start cmd (-1 if none). | |
abort_fc | Func code of Calibration-Abort cmd (-1 if none). |
References _LIM_Intercept::cal_abort_p, _LIM_Intercept::cal_start_p, lim_intercept_apid(), lim_intercept_check(), lim_intercept_command(), LIM_mode_handle_cal_abort(), LIM_mode_handle_cal_active(), LIM_mode_handle_cal_start(), and _Lim_Apid::pkt_send_p.
Referenced by LIM_capture_cal().
unsigned int lim_intercept_check | ( | LIM_Intercept * | object_p | ) | [static] |
Validate a LIM intercept object pointer.
object_p | Pointer to intercept object. |
References _LIM_Intercept::key, and LIM_INTERCEPT_VALID_KEY.
Referenced by LIM_intercept_cal(), LIM_intercept_delete(), lim_intercept_dispatch(), LIM_intercept_gbm(), LIM_intercept_physics(), and LIM_intercept_physics_idle().
unsigned int lim_intercept_command | ( | LIM_Intercept * | object_p, | |
Lim_Apid * | apid_info_p, | |||
unsigned int | func_code, | |||
LIM_Pkt_Send * | pkt_send_p, | |||
Lim_Handler | handler, | |||
char * | desc | |||
) | [static] |
Intercept a specific command.
object_p | Pointer to intercept object. | |
apid_info_p | Pointer to information about the command's APID. | |
func_code | Function code of the command. | |
pkt_send_p | Pointer to packet sending object for the command. | |
handler | Function to handle the command. | |
desc | Description of the command. |
References _Lim_Apid::apid, _Lim_Command::apid_p, _LIM_Intercept::cmd, _Lim_Command::desc, DIM, _Lim_Command::func_code, _Lim_Command::handler, LIM_pkt_set_info(), _Lim_Apid::orig_qid, and _Lim_Apid::orig_tid.
Referenced by LIM_intercept_cal(), LIM_intercept_gbm(), LIM_intercept_physics(), and LIM_intercept_physics_idle().
unsigned int LIM_intercept_delete | ( | LIM_Intercept * | object_p | ) |
Shutdown and delete a command intercept object.
object_p | Pointer to intercept object. |
References _Lim_Apid::apid, _LIM_Intercept::apid, DIM, _LIM_Intercept::disp_install, _LIM_Intercept::key, lim_intercept_check(), LIM_pkt_send_delete(), _LIM_Intercept::lim_tid, _Lim_Apid::orig_qid, _Lim_Apid::orig_tid, and _Lim_Apid::pkt_send_p.
Referenced by LIM_shutdown().
unsigned int lim_intercept_dispatch | ( | void * | prm, | |
const ITC_QueueItem * | qitem_p, | |||
void * | pay_p, | |||
unsigned int | len | |||
) | [static] |
Dispatch intercepted commands.
prm | User context parameter (pointer to intercept object). | |
qitem_p | Pointer to queue item. | |
pay_p | Pointer to queue item payload. | |
len | Length of queue item payload, in bytes. |
References _Lim_Apid::apid, _Lim_Command::apid_p, _LIM_Intercept::cmd, DIM, _Lim_Command::func_code, _Lim_Command::handler, lim_intercept_check(), _LIM_Intercept::mode_p, and _Lim_Apid::pkt_send_p.
Referenced by LIM_intercept_new().
unsigned int LIM_intercept_gbm | ( | LIM_Intercept * | object_p, | |
LIM_Pool * | pool_p, | |||
unsigned int | apid, | |||
int | calcinfo_fc, | |||
int | closeout_fc, | |||
int | repoint_fc | |||
) |
Intercept commands from the GBM.
object_p | Pointer to LIM intercept object. | |
pool_p | Pointer to memory pool object. | |
apid | APID to intercept. | |
calcinfo_fc | Function code of GBM-Calcinfo cmd (-1 if none). | |
closeout_fc | Function code of GBM-Closeout cmd (-1 if none). | |
repoint_fc | Function code of GBM-Repoint cmd (-1 if none). |
References _LIM_Intercept::gbm_calcinfo_p, _LIM_Intercept::gbm_closeout_p, _LIM_Intercept::gbm_repoint_p, lim_intercept_apid(), lim_intercept_check(), lim_intercept_command(), LIM_mode_handle_gbm_calcinfo(), LIM_mode_handle_gbm_closeout(), and LIM_mode_handle_gbm_repoint().
Referenced by LIM_capture_physics_with_db().
unsigned int LIM_intercept_new | ( | LIM_Intercept ** | object_pp, | |
ITC_TaskID | lim_tid, | |||
LIM_Mode * | mode_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 * | phys_start_p, | |||
LIM_Pkt_Send * | phys_stop_p, | |||
LIM_Pkt_Send * | phys_config_p, | |||
LIM_Pkt_Send * | gbm_calcinfo_p, | |||
LIM_Pkt_Send * | gbm_closeout_p, | |||
LIM_Pkt_Send * | gbm_repoint_p | |||
) |
Create and initialize a new command intercept object.
object_pp | Location to return pointer to new object. | |
lim_tid | ID of the LIM task. | |
mode_p | Pointer to a mode control object. | |
cal_start_p | Ptr to pkt sending object for Cal-Start cmd. | |
cal_abort_p | Ptr to pkt sending object for Cal-Abort cmd. | |
diag_start_p | Ptr to pkt sending object for Diag-Start cmd. | |
diag_abort_p | Ptr to pkt sending object for Diag-Abort cmd. | |
phys_start_p | Ptr to pkt sending object for Phys-Start cmd. | |
phys_stop_p | Ptr to pkt sending object for Phys-Stop cmd. | |
phys_config_p | Ptr to pkt sending object for Phys-Config cmd. | |
gbm_calcinfo_p | Ptr to pkt sending object for GBM-Calcinfo cmd. | |
gbm_closeout_p | Ptr to pkt sending object for GBM-Closeout cmd. | |
gbm_repoint_p | Ptr to pkt sending object for GBM-Repoint cmd. |
References _LIM_Intercept::cal_abort_p, _LIM_Intercept::cal_start_p, _LIM_Intercept::disp_install, _LIM_Intercept::gbm_calcinfo_p, _LIM_Intercept::gbm_closeout_p, _LIM_Intercept::gbm_repoint_p, _LIM_Intercept::key, lim_intercept_dispatch(), LIM_INTERCEPT_VALID_KEY, _LIM_Intercept::lim_tid, _LIM_Intercept::mode_p, _LIM_Intercept::phys_config_p, _LIM_Intercept::phys_start_p, and _LIM_Intercept::phys_stop_p.
Referenced by LIM_initialize().
unsigned int LIM_intercept_physics | ( | LIM_Intercept * | object_p, | |
LIM_Pool * | pool_p, | |||
unsigned int | apid, | |||
int | start_fc, | |||
int | stop_fc, | |||
int | config_fc | |||
) |
Intercept physics commands.
object_p | Pointer to LIM intercept object. | |
pool_p | Pointer to memory pool object. | |
apid | APID to intercept. | |
start_fc | Function code of Physics-Start cmd (-1 if none). | |
stop_fc | Function code of Physics-Stop cmd (-1 if none). | |
config_fc | Function code of Physics-Config cmd (-1 if none). |
References lim_intercept_apid(), lim_intercept_check(), lim_intercept_command(), LIM_mode_handle_physics_active(), LIM_mode_handle_physics_idle(), LIM_mode_handle_physics_start(), LIM_mode_handle_physics_stop(), _LIM_Intercept::phys_config_p, _LIM_Intercept::phys_start_p, _LIM_Intercept::phys_stop_p, and _Lim_Apid::pkt_send_p.
Referenced by LIM_capture_physics(), and LIM_capture_physics_with_db().
unsigned int LIM_intercept_physics_idle | ( | LIM_Intercept * | object_p, | |
LIM_Pool * | pool_p, | |||
unsigned int | apid, | |||
int | config_fc | |||
) |
Intercept physics commands that are valid when LPA is idle.
object_p | Pointer to LIM intercept object. | |
pool_p | Pointer to memory pool object. | |
apid | APID to intercept. | |
config_fc | Function code of Physics-Config cmd (-1 if none). |
References lim_intercept_apid(), lim_intercept_check(), lim_intercept_command(), LIM_mode_handle_physics_idle(), _LIM_Intercept::phys_config_p, and _Lim_Apid::pkt_send_p.
Referenced by LIM_capture_physics_with_db().