GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBS / dev > grbs_epu / linux-gcc
#include <GRB/GRB_epu.h>
#include <PBI/BSWP.ih>
#include <PBI/Endianness.h>
Classes | |
struct | _GRBS_epuCtl |
The GRBS photon writer control. More... | |
struct | _GRBS_msgBdy |
The message carrying the information about a candidate photon from the server side (EPU) to the client side (SIU). More... | |
struct | _GRBS_msg |
Structure of the message between the server (EPU) and client (SIU). More... | |
Typedefs | |
typedef struct _GRBS_epuCtl | GRBS_epuCtl |
Typedef for struct _GRBS_epuCtl. | |
typedef struct _GRBS_msgBdy | GRBS_msgBdy |
Typedef for struct _GRBS_msgBdy. | |
typedef struct _GRBS_msg | GRBS_msg |
Typedef for struct _GRBS_msg. | |
Functions | |
static __inline void | GRBS__msgCompose (GRBS_msg *msg, unsigned long long int seq, unsigned long long int time, unsigned int pps, unsigned int trg, 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 | GRBS__msgLength (const GRBS_msg *msg) |
Accessor to return the length of the message in 32-bit units. | |
static __inline unsigned long long int | GRBS__msgKey (const GRBS_msg *msg) |
Accessor to return the event sequence number. | |
static __inline unsigned long long int | GRBS__msgTime (const GRBS_msg *msg) |
Accessor to return the event time, in nanoseconds. | |
static __inline unsigned int | GRBS__msgPps (const GRBS_msg *msg) |
Accessor to return the GEM PPS timestamps. | |
static __inline unsigned int | GRBS__msgTrg (const GRBS_msg *msg) |
Accessor to return the event timestamp. | |
static __inline unsigned int | GRBS__msgDx (const GRBS_msg *msg) |
Accessor to return the event Dx. | |
static __inline unsigned int | GRBS__msgDy (const GRBS_msg *msg) |
Accessor to return the event Dy. | |
static __inline unsigned int | GRBS__msgDz (const GRBS_msg *msg) |
Accessor to return the event dz. | |
static __inline unsigned int | GRBS__msgEnergy (const GRBS_msg *msg) |
Accessor to return the event energy. | |
static __inline const GRBS_msg * | GRBS__msgNext (const GRBS_msg *msg) |
Returns a pointer to the message following the specified message. | |
static __inline const GRBS_msg * | GRBS__msgAdvance (const GRBS_msg *msg, int len32) |
Returns a pointer to the location of msg + len32. |
CVS $Id: GRBS_epu_p.h,v 1.5 2011/03/28 20:28:09 russell Exp $
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 _GRBS_msg::hdr.
static __inline void GRBS__msgCompose | ( | GRBS_msg * | msg, | |
unsigned long long int | seq, | |||
unsigned long long int | time, | |||
unsigned int | pps, | |||
unsigned int | trg, | |||
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 | |
pps | The GEM timestamp | |
trg | The event timestamps | |
dx | The unnormalized x direction cosine | |
dy | The unnormalized y direction cosine | |
dz | The unnormalized z direction cosine |
References _GRBS_msg::bdy, _GRBS_msgBdy::dx, _GRBS_msgBdy::dy, _GRBS_msgBdy::dz, _GRBS_msgBdy::energy, _GRBS_msg::hdr, _GRBS_msgBdy::pps, _GRBS_msgBdy::time, and _GRBS_msgBdy::trg.
Referenced by GRBS_writePhoton().
static __inline unsigned int GRBS__msgDx | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event Dx.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::dx.
static __inline unsigned int GRBS__msgDy | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event Dy.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::dy.
static __inline unsigned int GRBS__msgDz | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event dz.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::dz.
static __inline unsigned int GRBS__msgEnergy | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event energy.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::energy.
static __inline unsigned long long int GRBS__msgKey | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event sequence number.
msg | The target message |
References _GRBS_msg::hdr.
static __inline unsigned int GRBS__msgLength | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the length of the message in 32-bit units.
msg | The target message |
Returns a pointer to the message following the specified message.
msg | The target message |
References _GRBS_msg::hdr.
static __inline unsigned int GRBS__msgPps | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the GEM PPS timestamps.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::pps.
static __inline unsigned long long int GRBS__msgTime | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event time, in nanoseconds.
msg | The target message |
static __inline unsigned int GRBS__msgTrg | ( | const GRBS_msg * | msg | ) | [static] |
Accessor to return the event timestamp.
msg | The target message |
References _GRBS_msg::bdy, and _GRBS_msgBdy::trg.