GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GRBP / V1-0-1

Constituent: grbpsiu     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_msgdef.h File Reference

Format of the information being transmitted from the server-side (EPU) to the client-side (SIU). More...

#include "PBI/Endianness.h"
#include "GRB/GRB_msgdef.h"

Include dependency graph for GRBP_msgdef.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _GRBP_msgBdy
 The message carrying the information about a candidate photon from the server side (EPU) to the client side (SIU). More...
struct  _GRBP_msg
 Structure of the message between the server (EPU) and client (SIU). More...

Typedefs

typedef _GRBP_msgBdy GRBP_msgBdy
 Typedef for struct _GRBP_msgBdy.
typedef _GRBP_msg GRBP_msg
 Typedef for struct _GRBP_msg.

Functions

static __inline void GRBP__msgCompose (GRBP_msg *msg, unsigned long long int seq, unsigned long long int time, int energy, int dx, int dy, int dz)
 Composes a message (header + body) all values are written as big endian 32-bit values. When read on big-endian machines, no transformation needs to be done. On little-endian machines, the message is readable after doing a 4-byte swap on the entire message.
static __inline unsigned int GRBP__msgLength (const GRBP_msg *msg)
 Accessor to return the length of the message in 32-bit units.
static __inline unsigned long
long int 
GRBP__msgKey (const GRBP_msg *msg)
 Accessor to return the message sorting key.
static __inline unsigned long
long int 
GRBP__msgTime (const GRBP_msg *msg)
 Accessor to return the event time, in nanoseconds.
static __inline int GRBP__msgEnergy (const GRBP_msg *msg)
 Accessor to return the energy, in Mev.
static __inline int GRBP__msgDx (const GRBP_msg *msg)
 Accessor to return the unnormalized direction cosine.
static __inline int GRBP__msgDy (const GRBP_msg *msg)
 Accessor to return the unnormalized Y direction cosine.
static __inline int GRBP__msgDz (const GRBP_msg *msg)
 Accessor to return the unnormalized Z direction cosine.
static __inline const GRBP_msgGRBP__msgNext (const GRBP_msg *msg)
 Returns a pointer to the message following the specified message.
static __inline const GRBP_msgGRBP__msgAdvance (const GRBP_msg *msg, int len32)
 Returns a pointer to the location of msg + len32.

Detailed Description

Format of the information being transmitted from the server-side (EPU) to the client-side (SIU).

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: GRBP_msgdef.h,v 1.3 2007/06/26 02:22:07 russell Exp $

This defines the interface to the GRBP message. As a word of warning, do not access the structure's directly in user code. There are accessor functions that avoid endianness issues. Compliance with using the specified interface routines will at least keep the user code compile time compatiable to changes in this package.


Function Documentation

static __inline const GRBP_msg * GRBP__msgAdvance const GRBP_msg msg,
int  len32
[static]
 

Returns a pointer to the location of msg + len32.

Returns:
A pointer to the location of msg + len32.
Parameters:
msg The target message
len32 The amount, in 32-bit units to advance msg by.
Note:
This routine can be used instead of GRBP__msgNext when the length of message has already been extracted or when advancing by multiple messages. Otherwise, GRBP__msgNext should be used.
Warning:
This routine only advances the pointer to the address following the target message. There is no guarantee that a message actually occupies that memory. That question can only be answered by some higher level protocol

static __inline void GRBP__msgCompose GRBP_msg msg,
unsigned long long int  seq,
unsigned long long int  time,
int  energy,
int  dx,
int  dy,
int  dz
[static]
 

Composes a message (header + body) all values are written as big endian 32-bit values. When read on big-endian machines, no transformation needs to be done. On little-endian machines, the message is readable after doing a 4-byte swap on the entire message.

Parameters:
msg The message
seq The unique sequence number of this event. This number need not be dense, but must be montonically increasing from one packet to the next. This will be used as the sort index when merging packets
time The time, in nanoseconds of the event
energy The energy, in Mev, of the event
dx The unnormalized x direction cosine
dy The unnormalized y direction cosine
dz The unnormalized z direction cosine

static __inline int GRBP__msgDx const GRBP_msg msg  )  [static]
 

Accessor to return the unnormalized direction cosine.

Returns:
The unnormalized X direction cosine
Parameters:
msg The target message

static __inline int GRBP__msgDy const GRBP_msg msg  )  [static]
 

Accessor to return the unnormalized Y direction cosine.

Returns:
The unnormalized Y direction cosine
Parameters:
msg The target message

static __inline int GRBP__msgDz const GRBP_msg msg  )  [static]
 

Accessor to return the unnormalized Z direction cosine.

Returns:
The unnormalized Z direction cosine
Parameters:
msg The target message

static __inline int GRBP__msgEnergy const GRBP_msg msg  )  [static]
 

Accessor to return the energy, in Mev.

Returns:
The energy, in Mev
Parameters:
msg The target message

static __inline unsigned long long int GRBP__msgKey const GRBP_msg msg  )  [static]
 

Accessor to return the message sorting key.

Returns:
The message sorting key
Parameters:
msg The target message

static __inline unsigned int GRBP__msgLength const GRBP_msg msg  )  [static]
 

Accessor to return the length of the message in 32-bit units.

Returns:
The length of the message in 32-bit units
Parameters:
msg The target message

static __inline const GRBP_msg * GRBP__msgNext const GRBP_msg msg  )  [static]
 

Returns a pointer to the message following the specified message.

Returns:
A pointer to the message following the specified message
Parameters:
msg The target message
Warning:
This routine only advances the pointer to the address following the target message. There is no guarantee that a message actually occupies that memory. That question can only be answered by some higher level protocol

static __inline unsigned long long int GRBP__msgTime const GRBP_msg msg  )  [static]
 

Accessor to return the event time, in nanoseconds.

Returns:
The event time, in nanoseconds
Parameters:
msg The target message


Generated on Tue Sep 2 01:27:37 2008 by  doxygen 1.4.4