Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
DaqFramePreamble Class Reference

This object holds the information from the 'preamble' of a data frame. More...

#include <FramePreamble.hh>

Inheritance diagram for DaqFramePreamble:
Frame< AWF_Item > Frame< CRM_Item > Frame< DWF_Item > Frame< RTS_Item > Frame< SPE_Item > Frame< Status_Item > Frame< T > AWF_Frame CRM_Frame DWF_Frame RTS_Frame SPE_Frame Status_Frame

Public Member Functions

ulonglong frameTime ()
 
const unsigned short lcm_id () const
 get LCM idendifier
 
const unsigned short ars_id () const
 get ARS idendifier
 
const unsigned short data_type () const
 get data type
 
const unsigned short numberOfItems () const
 get number of items
 
virtual const unsigned char * getdata () const
 Return a pointer to the frame data buffer.
 
virtual const unsigned int getdatalen () const
 Return the length of the frame data buffer.
 
 DaqFramePreamble ()
 Construct an empty preamble object.
 
virtual ~DaqFramePreamble ()
 destructor
 
 ClassDef (DaqFramePreamble, 2)
 

Static Public Member Functions

static const unsigned int Length ()
 Return length of an encoded frame preamble in bytes.
 

Public Attributes

unsigned int frameSize
 Total length of the frame in 4-byte words.
 
unsigned short dataType
 Data type code (DAQ_xxx)
 
unsigned short frameTarget
 Unique code representing the shore station for this frame.
 
unsigned int frameTime1
 Frame 'time stamp' in units of 50ns (MSW)
 
unsigned int frameTime2
 Frame 'time stamp' in units of 50ns (LSW)
 
unsigned int frameIndex
 Number of frames since start of the run.
 
unsigned short status
 Status of frame Xon/Xoff.
 
unsigned short nbItems
 Number of items actually sent in this frame.
 
unsigned short LCM_ID
 ID of originating LCM.
 
unsigned short ARS_ID
 ID of originating ARS.
 
unsigned int runNumber
 Run-number as given by the RunControl.
 

Friends

std::ostream & operator<< (std::ostream &out, const DaqFramePreamble &object)
 Print ASCII.
 

Detailed Description

This object holds the information from the 'preamble' of a data frame.

Definition at line 23 of file FramePreamble.hh.

Constructor & Destructor Documentation

◆ DaqFramePreamble()

DaqFramePreamble::DaqFramePreamble ( )
inline

Construct an empty preamble object.

Definition at line 103 of file FramePreamble.hh.

103{ };

◆ ~DaqFramePreamble()

virtual DaqFramePreamble::~DaqFramePreamble ( )
inlinevirtual

destructor

Definition at line 108 of file FramePreamble.hh.

108{};

Member Function Documentation

◆ frameTime()

ulonglong DaqFramePreamble::frameTime ( )
inline
Returns
64 bit frame time

Definition at line 40 of file FramePreamble.hh.

41 {
43 }
unsigned int frameTime2
Frame 'time stamp' in units of 50ns (LSW)
unsigned int frameTime1
Frame 'time stamp' in units of 50ns (MSW)

◆ lcm_id()

const unsigned short DaqFramePreamble::lcm_id ( ) const
inline

get LCM idendifier

Returns
LCM identifier

Definition at line 67 of file FramePreamble.hh.

67{ return LCM_ID; }
unsigned short LCM_ID
ID of originating LCM.

◆ ars_id()

const unsigned short DaqFramePreamble::ars_id ( ) const
inline

get ARS idendifier

Returns
ARS identifier

Definition at line 73 of file FramePreamble.hh.

73{ return ARS_ID; }
unsigned short ARS_ID
ID of originating ARS.

◆ data_type()

const unsigned short DaqFramePreamble::data_type ( ) const
inline

get data type

Returns
data type

Definition at line 79 of file FramePreamble.hh.

79{ return dataType; }
unsigned short dataType
Data type code (DAQ_xxx)

◆ numberOfItems()

const unsigned short DaqFramePreamble::numberOfItems ( ) const
inline

get number of items

Returns
number of items

Definition at line 85 of file FramePreamble.hh.

85{ return nbItems; }
unsigned short nbItems
Number of items actually sent in this frame.

◆ getdata()

virtual const unsigned char * DaqFramePreamble::getdata ( ) const
inlinevirtual

Return a pointer to the frame data buffer.

The returned value points to the start of the frame preamble.

Returns
pointer to data

Definition at line 92 of file FramePreamble.hh.

92{ return NULL; }

◆ getdatalen()

virtual const unsigned int DaqFramePreamble::getdatalen ( ) const
inlinevirtual

Return the length of the frame data buffer.

The returned value is in bytes (not words), and includes the frame preamble.

Returns
length of data

Definition at line 100 of file FramePreamble.hh.

100{ return Length(); }
static const unsigned int Length()
Return length of an encoded frame preamble in bytes.

◆ Length()

static const unsigned int DaqFramePreamble::Length ( )
inlinestatic

Return length of an encoded frame preamble in bytes.

Definition at line 111 of file FramePreamble.hh.

111{ return 32; }

◆ ClassDef()

DaqFramePreamble::ClassDef ( DaqFramePreamble ,
2  )

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const DaqFramePreamble & object )
friend

Print ASCII.

Parameters
outoutput stream
objectframe preamble
Returns
output stream

Definition at line 120 of file FramePreamble.hh.

121 {
122 using namespace std;
123
124 out << "frameSize " << object.frameSize << endl;
125 out << "dataType " << object.dataType << endl;
126 out << "frameTarget " << object.frameTarget << endl;
127 out << "frameTime1 " << object.frameTime1 << endl;
128 out << "frameTime2 " << object.frameTime2 << endl;
129 out << "frameIndex " << object.frameIndex << endl;
130 out << "status " << object.status << endl;
131 out << "nbItems " << object.nbItems << endl;
132 out << "LCM_ID " << object.LCM_ID << endl;
133 out << "ARS_ID " << object.ARS_ID << endl;
134 out << "runNumber " << object.runNumber << endl;
135
136 return out;
137 }

Member Data Documentation

◆ frameSize

unsigned int DaqFramePreamble::frameSize

Total length of the frame in 4-byte words.

Definition at line 27 of file FramePreamble.hh.

◆ dataType

unsigned short DaqFramePreamble::dataType

Data type code (DAQ_xxx)

Definition at line 30 of file FramePreamble.hh.

◆ frameTarget

unsigned short DaqFramePreamble::frameTarget

Unique code representing the shore station for this frame.

Definition at line 33 of file FramePreamble.hh.

◆ frameTime1

unsigned int DaqFramePreamble::frameTime1

Frame 'time stamp' in units of 50ns (MSW)

Definition at line 36 of file FramePreamble.hh.

◆ frameTime2

unsigned int DaqFramePreamble::frameTime2

Frame 'time stamp' in units of 50ns (LSW)

Definition at line 38 of file FramePreamble.hh.

◆ frameIndex

unsigned int DaqFramePreamble::frameIndex

Number of frames since start of the run.

Definition at line 46 of file FramePreamble.hh.

◆ status

unsigned short DaqFramePreamble::status

Status of frame Xon/Xoff.

Definition at line 49 of file FramePreamble.hh.

◆ nbItems

unsigned short DaqFramePreamble::nbItems

Number of items actually sent in this frame.

Definition at line 52 of file FramePreamble.hh.

◆ LCM_ID

unsigned short DaqFramePreamble::LCM_ID

ID of originating LCM.

Definition at line 55 of file FramePreamble.hh.

◆ ARS_ID

unsigned short DaqFramePreamble::ARS_ID

ID of originating ARS.

Definition at line 58 of file FramePreamble.hh.

◆ runNumber

unsigned int DaqFramePreamble::runNumber

Run-number as given by the RunControl.

Definition at line 61 of file FramePreamble.hh.


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