GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRB / dev > grb_doc / rhel5-32
#include <PBI/Endianness.h>
#include <PBI/BSWP.ih>
Classes | |
struct | _GRB_msgHdr |
The message header. More... | |
Typedefs | |
typedef struct _GRB_msgHdr | GRB_msgHdr |
Typedef for struct _GRB_msgHdr. | |
Functions | |
static __inline void | GRB__msgCompose (GRB_msgHdr *hdr, unsigned char len32, unsigned long long key) |
Composes the message header, filling in the length and message sorting key. | |
static __inline unsigned int | GRB__msgLength (const GRB_msgHdr *hdr) |
Accessor to return the length of the message in 32-bit units. | |
static __inline unsigned long long int | GRB__msgKey (const GRB_msgHdr *hdr) |
Accessor to return the message sorting key. | |
static __inline const GRB_msgHdr * | GRB__msgNext (const GRB_msgHdr *hdr) |
Returns a pointer to the message header following the specified message header hdr. | |
static __inline const GRB_msgHdr * | GRB__msgAdvance (const GRB_msgHdr *hdr, int len32) |
Returns a pointer to the location of hdr + len32. |
CVS $Id: GRB_msgdef.h,v 1.7 2011/03/25 23:20:51 apw Exp $
This defines the interface to the GRB message header. 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.
Typedef for struct _GRB_msgHdr.
static __inline const GRB_msgHdr * GRB__msgAdvance | ( | const GRB_msgHdr * | hdr, | |
int | len32 | |||
) | [static] |
Returns a pointer to the location of hdr + len32.
hdr | The target message header | |
len32 | The amount, in 32-bit units to advance hdr by. |
static __inline void GRB__msgCompose | ( | GRB_msgHdr * | hdr, | |
unsigned char | len32, | |||
unsigned long long | key | |||
) | [static] |
Composes the message header, filling in the length and message sorting key.
hdr | The message header to compose | |
len32 | The length of the message, in 32-bit units | |
key | The sorting key. This is meant to a unique, increasing unsigned 48 bit number. Here unique means unique within a run and amongst the data taking CPUs. |
References _GRB_msgHdr::keylo.
static __inline unsigned long long int GRB__msgKey | ( | const GRB_msgHdr * | hdr | ) | [static] |
Accessor to return the message sorting key.
hdr | The target message header |
References _GRB_msgHdr::keylo.
static __inline unsigned int GRB__msgLength | ( | const GRB_msgHdr * | hdr | ) | [static] |
Accessor to return the length of the message in 32-bit units.
hdr | The target message header |
Referenced by GRB__msgNext().
static __inline const GRB_msgHdr * GRB__msgNext | ( | const GRB_msgHdr * | hdr | ) | [static] |
Returns a pointer to the message header following the specified message header hdr.
hdr | The target message header |
References GRB__msgLength().