GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GRBP / V0-4-2

Constituent: grbpsiu     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_client.c File Reference

The client side (SIU) of the GRB algorithm. More...

#include "GRBP/GRBP_client.h"
#include "GRBP_msgdef.h"
#include "GRBP_cache.h"
#include "GRBP_probability.h"
#include "GRBP_window.h"
#include "GRBP_message.h"
#include "GRBP_grb.h"
#include "GRBP_windowList.h"
#include "GRBP_windowState.h"
#include "GRBP_gbmMsg.h"
#include "GRBP_gbmRepoint.h"
#include "round.h"
#include "tmr.h"
#include "GRBP_DB/GRBP_DB_clientSchema.h"
#include "GRB/GRB_siu.h"
#include "GRB/GRB_gbmMsg.h"
#include "ATT/ATT.h"
#include "MSG/MSG_macdefs.h"
#include <string.h>
#include <stdio.h>

Include dependency graph for GRBP_client.c:


Data Structures

struct  _GRBP_clientStats
 Statistics gathered. More...
struct  _GRBP_client
 The client for the SIU side of the GRB algorithm. More...

Typedefs

typedef enum _GRBP_clientState GRBP_clientState
 Typedef for enum _GRBP_clientState.
typedef _GRBP_clientStats GRBP_clientStats
 Typedef for struct _GRBP_clientStats.
typedef _GRBP_client GRBP_client
 Typedef for struct _GRBP_client.

Enumerations

enum  _GRBP_clientState {
  GRBP_CLIENTSTATE_K_INACTIVE = -1,
  GRBP_CLIENTSTATE_K_GRB_LAT = 0,
  GRBP_CLIENTSTATE_K_GRB_GBM = 1
}
 Captures the processing state. This is one of
  1. No GRB active, just entering photons looking for one
  2. LAT GRB active, a LAT triggered GRB is active
  3. GBM GRB active, a GBM triggered GRB is active.
More...

Functions

void GRBP_clientConstruct (GRBP_client *client, const GRBP_DB_clientSchema *cfg)
 Constructs a GRBP client-side (SIU) context using the parameters specified in the configuration, cfg. It is assumed that the user has called GRBP_clientSizeof using the same configuration structure to determine the number of bytes needed to support the specified configuration and that the user has allocated those bytes in the memory pointed to by client.
void GRBP_clientProcess (GRBP_client *client, unsigned long long int id, unsigned long long int time, unsigned int energy, int dx, int dy, int dz)
 Driver function used to detect a GRB.
void GRBP_clientMsgProcess (GRBP_client *client, const GRBP_msg *msg)
 Driver function used to detect a GRB.
static __inline void reset (GRBP_client *client)
 Resets the client context. This routine is generally called after a GRB closeout has been issued, thus preparing it for a new round of detection.
static void start (GRBP_client *client)
 Called when GRB processing is started.
static void stop (GRBP_client *client)
 Called when GRB processing is stopped.
static __inline unsigned int xform (ATT_Control *att, unsigned long long int time, int dx, int dy, int dz, double q[4], double dsky[3])
 Does the LAT relative to absolute coordinate transformation.
static __inline void grbDeclare (GRBP_client *client, GRBP_window *window, double current_time)
 Checks, if a GRB suspected message should be declared and if, so, delivers one.
static __inline int confirmCheck (GRBP_client *client)
 Checks, if a GRB confirmation message should be declared and if, so, delivers one.
static __inline int updateCheck (GRBP_client *client, int added, double current_time)
 Checks if an update or closeout message needs to be issued. If so, one is issued.
static __inline void statsReset (GRBP_clientStats *stats)
 Resets the client statistics block. This routine is generally cleared after a GRB closeout has been issued.
static void gbmRepointHandler (GRBP_client *client, GRB_gbmRptMsg *msg)
 Function to handle an incoming GBM repoint message.
static void gbmInterruptHandler (GRBP_client *client)
 Function to handle an incoming GBM interrupt signal.
static void gbmCalculateHandler (GRBP_client *client, GRB_gbmCalcMsg *msg)
 Function to handle an incoming GBM interrupt signal.
static void gbmCloseoutHandler (GRBP_client *client, GRB_gbmCloseMsg *msg)
 Function to handle an incoming GBM closeout message.
int GRBP_clientSizeof (const GRBP_DB_clientSchema *cfg)
 Computes the number of bytes needed to support the specified configuration, cfg.
const GRB_siuServices * GRBP_clientServicesGet (GRBP_client *client, GRBP_DB_clientSchema *schema, const GRB_latMsgServices *msgServices)
 Constructs the client context and returns the services table.

Detailed Description

The client side (SIU) of the GRB algorithm.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: GRBP_client.c,v 1.6 2007/10/26 02:00:31 russell Exp $

Enumeration Type Documentation

enum _GRBP_clientState
 

Captures the processing state. This is one of

  1. No GRB active, just entering photons looking for one
  2. LAT GRB active, a LAT triggered GRB is active
  3. GBM GRB active, a GBM triggered GRB is active.

Enumerator:
GRBP_CLIENTSTATE_K_INACTIVE  No GRB active
GRBP_CLIENTSTATE_K_GRB_LAT  LAT GRB active
GRBP_CLIENTSTATE_K_GRB_GBM  GRM GRB active


Function Documentation

static __inline int confirmCheck GRBP_client client  )  [static]
 

Checks, if a GRB confirmation message should be declared and if, so, delivers one.

Return values:
0 No GRB confirmation message issued
1 GRB confirmation message issued

static void gbmCalculateHandler GRBP_client client,
GRB_gbmCalcMsg *  msg
[static]
 

Function to handle an incoming GBM interrupt signal.

Parameters:
client The GRBP client context
msg The GBM calculate message

static void gbmCloseoutHandler GRBP_client client,
GRB_gbmCloseMsg *  msg
[static]
 

Function to handle an incoming GBM closeout message.

Parameters:
client The GRBP client context
msg The GBM closeout message

static void gbmInterruptHandler GRBP_client client  )  [static]
 

Function to handle an incoming GBM interrupt signal.

Parameters:
client The GRBP client context

static void gbmRepointHandler GRBP_client client,
GRB_gbmRptMsg *  msg
[static]
 

Function to handle an incoming GBM repoint message.

Parameters:
client The GRBP client context
msg The GBM repoint message

static __inline void grbDeclare GRBP_client client,
GRBP_window window,
double  current_time
[static]
 

Checks, if a GRB suspected message should be declared and if, so, delivers one.

Parameters:
client The client context
window The GRB window
current_time The current time, as determined by the most recent photon

void GRBP_clientConstruct GRBP_client client,
const GRBP_DB_clientSchema *  cfg
 

Constructs a GRBP client-side (SIU) context using the parameters specified in the configuration, cfg. It is assumed that the user has called GRBP_clientSizeof using the same configuration structure to determine the number of bytes needed to support the specified configuration and that the user has allocated those bytes in the memory pointed to by client.

Parameters:
client The client-side context handle to fill
cfg The configuration

void GRBP_clientMsgProcess GRBP_client client,
const GRBP_msg msg
 

Driver function used to detect a GRB.

Parameters:
client The GRBP client side context
msg The message containing the information about the new photon

void GRBP_clientProcess GRBP_client client,
unsigned long long int  id,
unsigned long long int  time,
unsigned int  energy,
int  dx,
int  dy,
int  dz
 

Driver function used to detect a GRB.

Parameters:
client The GRBP client side context
id The event sequence number of the photon to be added
time The time of the photon to be added
energy The energy, in Mev, of the photon to be added
dx The unnormalized x direction cosine
dy The unnormalized y direction cosine
dz The unnormalized z direction cosine
This routine is called each time a new photon is added. The parameters are those used by the GRB algorithm to define a photon, basically its time of arrival, energy and direction. An unique, but arbitrary, integer, is used to identify the photon.

const GRB_siuServices * GRBP_clientServicesGet GRBP_client client,
GRBP_DB_clientSchema *  schema,
const GRB_latMsgServices *  msgServices
 

Constructs the client context and returns the services table.

Parameters:
client The client-side context to construct
schema The configuration block
msgServices The routines to call to deliver an alert message

int GRBP_clientSizeof const GRBP_DB_clientSchema *  cfg  ) 
 

Computes the number of bytes needed to support the specified configuration, cfg.

Returns:
The number of bytes needed to support the specified configuration
Parameters:
cfg The configuration

static __inline void reset GRBP_client client  )  [static]
 

Resets the client context. This routine is generally called after a GRB closeout has been issued, thus preparing it for a new round of detection.

Parameters:
client The client context to clear

static void start GRBP_client client  )  [static]
 

Called when GRB processing is started.

Parameters:
client The client to start

static __inline void statsReset GRBP_clientStats stats  )  [static]
 

Resets the client statistics block. This routine is generally cleared after a GRB closeout has been issued.

Parameters:
stats The statistics block to reset

static void stop GRBP_client client  )  [static]
 

Called when GRB processing is stopped.

Parameters:
client The client to stop

static __inline int updateCheck GRBP_client client,
int  added,
double  current_time
[static]
 

Checks if an update or closeout message needs to be issued. If so, one is issued.

Returns:
1, If GRB is still active

0, If GRB is now inactive

Parameters:
client The client context
added The number of photons added this time
current_time The current time, as determined by the most recent photon

static __inline unsigned int xform ATT_Control *  att,
unsigned long long int  time,
int  dx,
int  dy,
int  dz,
double  q[4],
double  dsky[3]
[static]
 

Does the LAT relative to absolute coordinate transformation.

Return values:
Message code
Parameters:
att The attitude history control handle, i.e. the source of the transformations
time The WCT time of the event
dx The LAT relative unnormalized X direction cosine
dy The LAT relative unnormalized Y direction cosine
dz The LAT relative unnormalized Y direction cosine
q The quarternion used in the transformation
dsky Returned as the normalized sky coordination direction cosines


Generated on Mon Oct 29 03:03:51 2007 by  doxygen 1.4.4