lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Bld::Header Class Reference

Header of a BLD multicast packet, overlaid on the packet buffer: a full header before the first payload and a short header, holding offsets from the full header, before each later payload. More...

#include <Header.hh>

Public Types

enum  { sizeofFirst = 28 , sizeofNext = 12 }
 Header sizes in bytes. More...
 
enum  { MTU = 8192 }
 Packet buffer size. More...
 

Public Member Functions

 Header ()
 Does nothing; used to overlay an existing buffer.
 
 Header (uint64_t pulseId, uint64_t timeStamp, unsigned src)
 Write a full header: pulseId in 64-bit word 0, timeStamp in 64-bit word 1 and src in the following 32-bit word; only these 20 bytes are written.
 
 Header (uint64_t pulseId, uint64_t timeStamp, const Header &ref)
 Write a short header word relative to the full header ref: bits 31-20 hold the low 12 bits of the pulse ID difference and bits 19-0 the low 20 bits of the time stamp difference.
 
bool done (uint64_t pulseId) const
 Return true if pulseId exceeds 64-bit word 0 of this header by more than 1023.
 
uint64_t pulseId () const
 Return 64-bit word 1 of the header.
 
unsigned id () const
 Return 32-bit word 4 (bytes 16-19), where the full-header constructor stores src.
 

Detailed Description

Header of a BLD multicast packet, overlaid on the packet buffer: a full header before the first payload and a short header, holding offsets from the full header, before each later payload.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Header sizes in bytes.

Enumerator
sizeofFirst 

Bytes before the first payload of a packet (28).

sizeofNext 

Bytes before each later payload (12); the short-header constructor writes only the first 4.

◆ anonymous enum

anonymous enum

Packet buffer size.

Enumerator
MTU 

Size in bytes of the packet buffers of Client and Server (8192).

Constructor & Destructor Documentation

◆ Header() [1/3]

Pds::Bld::Header::Header ( )
inline

Does nothing; used to overlay an existing buffer.

◆ Header() [2/3]

Pds::Bld::Header::Header ( uint64_t  pulseId,
uint64_t  timeStamp,
unsigned  src 
)
inline

Write a full header: pulseId in 64-bit word 0, timeStamp in 64-bit word 1 and src in the following 32-bit word; only these 20 bytes are written.

◆ Header() [3/3]

Pds::Bld::Header::Header ( uint64_t  pulseId,
uint64_t  timeStamp,
const Header &  ref 
)
inline

Write a short header word relative to the full header ref: bits 31-20 hold the low 12 bits of the pulse ID difference and bits 19-0 the low 20 bits of the time stamp difference.

Member Function Documentation

◆ done()

bool Pds::Bld::Header::done ( uint64_t  pulseId) const
inline

Return true if pulseId exceeds 64-bit word 0 of this header by more than 1023.

◆ id()

unsigned Pds::Bld::Header::id ( ) const
inline

Return 32-bit word 4 (bytes 16-19), where the full-header constructor stores src.

◆ pulseId()

uint64_t Pds::Bld::Header::pulseId ( ) const
inline

Return 64-bit word 1 of the header.

Note that the full-header constructor stores timeStamp there and pulseId in word 0.


The documentation for this class was generated from the following file: