GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIM / V1-20-0

Constituent: lim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LIM_gbm.c File Reference

Handle the interface to the Gamma-Ray Burst Monitor (GBM). More...

#include "string.h"
#include "ITC/ITC_pubdefs.h"
#include "LIM/LIM_msgs.h"
#include "LIM/LIM_pubdefs.h"
#include "LIM_DB/LIM_DB_schema.h"
#include "LPA/LPA_cmddefs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/MBA.h"
#include "LIM_action.h"
#include "LIM_bulk.h"
#include "LIM_gbm.h"
#include "LIM_lpa.h"
#include "LIM_pid.h"
#include "LIM_pkt_send.h"
#include "LIM_sc.h"

Include dependency graph for LIM_gbm.c:


Data Structures

struct  _LIM_Gbm
 State information for a GBM interface object. More...

Defines

#define LIM_GBM_VALID_KEY   (('L'<<24)+('G'<<16)+('B'<<8)+'M')
 Value that indicates the GBM interface object state is valid.

Functions

static unsigned int lim_gbm_check (LIM_Gbm *object_p)
 Validate a GBM interface object pointer.
static unsigned int lim_gbm_id_check (LIM_Gbm *object_p, unsigned int trig_id_hi, unsigned int trig_id_lo, unsigned int seq_num)
 Validate the ID within a command from the GBM.
static void LIM_gbm_int_pri_isr (void *parm)
 Service primary GBM interrupts.
static void LIM_gbm_int_red_isr (void *parm)
 Service redundant GBM interrupts.
unsigned int LIM_gbm_new (LIM_Gbm **object_pp, LIM_Action *action_p, LIM_Lpa *lpa_p, LIM_Sc *sc_p, LIM_Bulk *bulk_p, LIM_Pkt_Send *calcinfo_p, LIM_Pkt_Send *closeout_p, LIM_Pkt_Send *repoint_p, const LIM_DB_Schema *db_p)
 Create and initialize a new GBM interface object.
unsigned int LIM_gbm_delete (LIM_Gbm *object_p)
 Shutdown and delete a GBM interface object.
unsigned int LIM_gbm_change_pri_int_allowed (LIM_Gbm *object_p, int new_value, LIM_Task *task_p)
 Change the value of the pri_int_allowed flag.
unsigned int LIM_gbm_change_red_int_allowed (LIM_Gbm *object_p, int new_value, LIM_Task *task_p)
 Change the value of the red_int_allowed flag.
unsigned int LIM_gbm_change_rep_allowed (LIM_Gbm *object_p, int new_value, LIM_Task *task_p)
 Change the value of the GBM-Repoint-Allowed flag.
unsigned int LIM_gbm_get_info (LIM_Gbm *object_p, LIM_Info *info_p)
 Return GBM interface information.
unsigned int LIM_gbm_configure_interrupts (LIM_Gbm *object_p)
 Enable and disable the GBM interrupts.
unsigned int LIM_gbm_enable_interrupts (LIM_Gbm *object_p)
 Enable the GBM interrupts.
unsigned int LIM_gbm_handle_bulk (LIM_Gbm *object_p, LIM_Grb_State grb_state, int *int_occur_p)
 Handle a message on the BULK queue.
unsigned int LIM_gbm_handle_grb_idle (LIM_Gbm *object_p)
 Handle a transition to the GRB-Idle state.
int LIM_gbm_calcinfo_fcode (void)
 Return the function code of the GBM-Calcinfo command.
unsigned int LIM_gbm_sizeof_calcinfo (void)
 Return the size of a GBM-Calcinfo command.
unsigned int LIM_gbm_handle_calcinfo (LIM_Gbm *object_p, const ITC_QueueItem *qitem_p, int forward_ok, int *is_valid_p)
 Handle a GBM-Calcinfo command.
int LIM_gbm_closeout_fcode (void)
 Return the function code of the GBM-Closeout command.
unsigned int LIM_gbm_sizeof_closeout (void)
 Return the size of a GBM-Closeout command.
unsigned int LIM_gbm_handle_closeout (LIM_Gbm *object_p, const ITC_QueueItem *qitem_p, int forward_ok, int *is_valid_p)
 Handle a GBM-Closeout command.
int LIM_gbm_repoint_fcode (void)
 Return the function code of the GBM-Repoint command.
unsigned int LIM_gbm_sizeof_repoint (void)
 Return the size of a GBM-Repoint command.
unsigned int LIM_gbm_handle_repoint (LIM_Gbm *object_p, const ITC_QueueItem *qitem_p, int forward_ok, int slew_req_ok, int *is_valid_p)
 Handle a GBM-Repoint command.

Detailed Description

Handle the interface to the Gamma-Ray Burst Monitor (GBM).

**  CVS $Id: LIM_gbm.c,v 1.18 2007/12/17 23:04:42 dmay Exp $
**  

Function Documentation

int LIM_gbm_calcinfo_fcode void   ) 
 

Return the function code of the GBM-Calcinfo command.

Returns:
GBM-Calcinfo command function code.

unsigned int LIM_gbm_change_pri_int_allowed LIM_Gbm object_p,
int  new_value,
LIM_Task task_p
 

Change the value of the pri_int_allowed flag.

Parameters:
object_p Pointer to GBM interface object.
new_value New flag value.
task_p Pointer to task control object.
Returns:
MSG code.

unsigned int LIM_gbm_change_red_int_allowed LIM_Gbm object_p,
int  new_value,
LIM_Task task_p
 

Change the value of the red_int_allowed flag.

Parameters:
object_p Pointer to GBM interface object.
new_value New flag value.
task_p Pointer to task control object.
Returns:
MSG code.

unsigned int LIM_gbm_change_rep_allowed LIM_Gbm object_p,
int  new_value,
LIM_Task task_p
 

Change the value of the GBM-Repoint-Allowed flag.

Parameters:
object_p Pointer to GBM interface object.
new_value New flag value.
task_p Pointer to task control object.
Returns:
MSG code.

unsigned int lim_gbm_check LIM_Gbm object_p  )  [static]
 

Validate a GBM interface object pointer.

Parameters:
object_p Pointer to GBM interface object.
Returns:
MSG code.

int LIM_gbm_closeout_fcode void   ) 
 

Return the function code of the GBM-Closeout command.

Returns:
GBM-Closeout command function code.

unsigned int LIM_gbm_configure_interrupts LIM_Gbm object_p  ) 
 

Enable and disable the GBM interrupts.

Parameters:
object_p Pointer to GBM interface object.
Returns:
MSG code.

unsigned int LIM_gbm_delete LIM_Gbm object_p  ) 
 

Shutdown and delete a GBM interface object.

Parameters:
object_p Pointer to object.
Returns:
MSG code.

unsigned int LIM_gbm_enable_interrupts LIM_Gbm object_p  ) 
 

Enable the GBM interrupts.

Parameters:
object_p Pointer to GBM interface object.
Returns:
MSG code.

unsigned int LIM_gbm_get_info LIM_Gbm object_p,
LIM_Info info_p
 

Return GBM interface information.

Parameters:
object_p Pointer to GBM interface object.
info_p Location to return GBM interface information (must not be NULL).
Returns:
MSG code.

unsigned int LIM_gbm_handle_bulk LIM_Gbm object_p,
LIM_Grb_State  grb_state,
int *  int_occur_p
 

Handle a message on the BULK queue.

Parameters:
object_p Pointer to GBM interface object.
grb_state Current GRB state.
int_occur_p Location to return interrupt status.
Returns:
MSG code.

unsigned int LIM_gbm_handle_calcinfo LIM_Gbm object_p,
const ITC_QueueItem *  qitem_p,
int  forward_ok,
int *  is_valid_p
 

Handle a GBM-Calcinfo command.

Parameters:
object_p Pointer to GBM interface object.
qitem_p Pointer to queue item containing the command.
forward_ok Flag indicating that command can be forwarded to LPA.
is_valid_p Location to return validity indication.
Returns:
MSG code.

unsigned int LIM_gbm_handle_closeout LIM_Gbm object_p,
const ITC_QueueItem *  qitem_p,
int  forward_ok,
int *  is_valid_p
 

Handle a GBM-Closeout command.

Parameters:
object_p Pointer to GBM interface object.
qitem_p Pointer to queue item containing the command.
forward_ok Flag indicating that command can be forwarded to LPA.
is_valid_p Location to return validity indication.
Returns:
MSG code.

unsigned int LIM_gbm_handle_grb_idle LIM_Gbm object_p  ) 
 

Handle a transition to the GRB-Idle state.

Parameters:
object_p Pointer to GBM interface object.
Returns:
MSG code.

unsigned int LIM_gbm_handle_repoint LIM_Gbm object_p,
const ITC_QueueItem *  qitem_p,
int  forward_ok,
int  slew_req_ok,
int *  is_valid_p
 

Handle a GBM-Repoint command.

Parameters:
object_p Pointer to GBM interface object.
qitem_p Pointer to queue item containing the command.
forward_ok Flag indicating that cmd can be forwarded to LPA.
slew_req_ok Flag indicating that slew-req can be sent to S/C.
is_valid_p Location to return validity indication.
Returns:
MSG code.

unsigned int lim_gbm_id_check LIM_Gbm object_p,
unsigned int  trig_id_hi,
unsigned int  trig_id_lo,
unsigned int  seq_num
[static]
 

Validate the ID within a command from the GBM.

Parameters:
object_p Pointer to GBM object.
trig_id_hi Trig_id_hi value from the GBM command.
trig_id_lo Trig_id_lo value from the GBM command.
seq_num Seq_num value from the GBM command.
Returns:
MSG code.

void LIM_gbm_int_pri_isr void *  parm  )  [static]
 

Service primary GBM interrupts.

Parameters:
parm Pointer to GBM interface object.
Returns:
Nothing.

void LIM_gbm_int_red_isr void *  parm  )  [static]
 

Service redundant GBM interrupts.

Parameters:
parm Pointer to GBM interface object.
Returns:
Nothing.

unsigned int LIM_gbm_new LIM_Gbm **  object_pp,
LIM_Action action_p,
LIM_Lpa lpa_p,
LIM_Sc sc_p,
LIM_Bulk bulk_p,
LIM_Pkt_Send calcinfo_p,
LIM_Pkt_Send closeout_p,
LIM_Pkt_Send repoint_p,
const LIM_DB_Schema *  db_p
 

Create and initialize a new GBM interface object.

Parameters:
object_pp Location to return pointer to new object.
action_p Pointer to an action reporting object.
lpa_p Pointer to an LPA interface object.
sc_p Pointer to a spacecraft interface object.
bulk_p Pointer to a BULK queue object.
calcinfo_p Pointer to pkt sending object for GBM-Calcinfo cmd.
closeout_p Pointer to pkt sending object for GBM-Closeout cmd.
repoint_p Pointer to pkt sending object for GBM-Repoint cmd.
db_p Pointer to configuration information.
Returns:
MSG code.

int LIM_gbm_repoint_fcode void   ) 
 

Return the function code of the GBM-Repoint command.

Returns:
GBM-Repoint command function code.

unsigned int LIM_gbm_sizeof_calcinfo void   ) 
 

Return the size of a GBM-Calcinfo command.

Returns:
GBM-Calcinfo command size, in bytes.

unsigned int LIM_gbm_sizeof_closeout void   ) 
 

Return the size of a GBM-Closeout command.

Returns:
GBM-Closeout command size, in bytes.

unsigned int LIM_gbm_sizeof_repoint void   ) 
 

Return the size of a GBM-Repoint command.

Returns:
GBM-Repoint command size, in bytes.


Generated on Thu Oct 30 01:44:39 2008 by  doxygen 1.4.4