GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / V1-0-4 > grbp_msg_print / rhel6-32
#include <PBI/Endianness.h>
#include <GRB/GRB_msgdef.h>
Classes | |
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 struct _GRBP_msgBdy | GRBP_msgBdy |
Typedef for struct _GRBP_msgBdy. | |
typedef struct _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_msg * | GRBP__msgNext (const GRBP_msg *msg) |
Returns a pointer to the message following the specified message. | |
static __inline const GRBP_msg * | GRBP__msgAdvance (const GRBP_msg *msg, int len32) |
Returns a pointer to the location of msg + len32. |
CVS $Id: GRBP_msgdef.h,v 1.4 2011/03/30 22:11:51 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.
Returns a pointer to the location of msg + len32.
msg | The target message | |
len32 | The amount, in 32-bit units to advance msg by. |
References _GRBP_msg::hdr.
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.
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 |
References _GRBP_msg::bdy, _GRBP_msgBdy::dx, _GRBP_msgBdy::dy, _GRBP_msgBdy::dz, _GRBP_msgBdy::energy, _GRBP_msg::hdr, and _GRBP_msgBdy::time.
static __inline int GRBP__msgDx | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the unnormalized direction cosine.
msg | The target message |
References _GRBP_msg::bdy, and _GRBP_msgBdy::dx.
static __inline int GRBP__msgDy | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the unnormalized Y direction cosine.
msg | The target message |
References _GRBP_msg::bdy, and _GRBP_msgBdy::dy.
static __inline int GRBP__msgDz | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the unnormalized Z direction cosine.
msg | The target message |
References _GRBP_msg::bdy, and _GRBP_msgBdy::dz.
static __inline int GRBP__msgEnergy | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the energy, in Mev.
msg | The target message |
References _GRBP_msg::bdy, and _GRBP_msgBdy::energy.
static __inline unsigned long long int GRBP__msgKey | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the message sorting key.
msg | The target message |
References _GRBP_msg::hdr.
Referenced by main().
static __inline unsigned int GRBP__msgLength | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the length of the message in 32-bit units.
msg | The target message |
References _GRBP_msg::hdr.
Referenced by main().
Returns a pointer to the message following the specified message.
msg | The target message |
References _GRBP_msg::hdr.
static __inline unsigned long long int GRBP__msgTime | ( | const GRBP_msg * | msg | ) | [static] |
Accessor to return the event time, in nanoseconds.
msg | The target message |
Referenced by main().