GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
MbsAPI
sMbs.h
Go to the documentation of this file.
1
// $Id: sMbs.h 478 2009-10-29 12:26:09Z linev $
2
//-----------------------------------------------------------------------
3
// The GSI Online Offline Object Oriented (Go4) Project
4
// Experiment Data Processing at EE department, GSI
5
//-----------------------------------------------------------------------
6
// Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7
// Planckstr. 1, 64291 Darmstadt, Germany
8
// Contact: http://go4.gsi.de
9
//-----------------------------------------------------------------------
10
// This software can be used under the license agreements as stated
11
// in Go4License.txt file which is part of the distribution.
12
//-----------------------------------------------------------------------
13
14
#ifndef MbsStruct
15
#define MbsStruct
16
17
#define LMD__TYPE_FILE_HEADER_101_1 0x00010065
18
#define LMD__TYPE_EVENT_HEADER_10_1 0x0001000a
19
#define LMD__TYPE_FILE_INDEX_101_2 0x00020065
20
#define LMD__TYPE_BUFFER_HEADER_10_1 0x0001000a
21
#define LMD__TYPE_BUFFER_HEADER_100_1 0x00010064
22
#define LMD__TYPE_TIME_STAMP_11_1 0x0001000b
23
#define LMD__GET_EVENTS NULL
24
#define LMD__STANDARD_HEADER NULL
25
#define LMD__INTERNAL_HEADER NULL
26
#define LMD__INDEX 1
27
#define LMD__OVERWRITE 1
28
#define LMD__LARGE_FILE 1
29
#define LMD__MIN_BUFFER 0
30
#define LMD__BUFFER 1
31
#define LMD__VERBOSE 1
32
#define LMD__NO_VERBOSE 0
33
#define LMD__NO_BUFFER 0
34
#define LMD__NO_INDEX 0
35
#define LMD__NO_OVERWRITE 0
36
#define LMD__NO_LARGE_FILE 0
37
#define LMD__NO_VERBOSE 0
38
#define LMD__VERBOSE 1
39
#define LMD__ENDIAN_LITTLE 1
40
#define LMD__ENDIAN_BIG 2
41
#define LMD__ENDIAN_UNKNOWN 0
42
43
#include "
s_stdint.h
"
44
45
typedef
uint64_t
lmdoff_t
;
46
47
// must #include <stdint.h>
48
// on Lynx, define int32_t, uint32_t, int16_t
49
// structure used to talk between client and server
50
// Client connects to server (MBS) and reads this structure first
51
52
//--------------------------------------------------
53
// Structure maps the MBS transport info buffer
54
typedef
struct
{
55
uint32_t
iEndian
;
// byte order. Set to 1 by sender
56
uint32_t
iMaxBytes
;
// maximum buffer size
57
uint32_t
iBuffers
;
// buffers per stream
58
uint32_t
iStreams
;
// number of streams
59
}
sMbsTransportInfo
;
60
61
//--------------------------------------------------
62
// Buffer header, maps s_bufhe, some fields used in different way
63
typedef
struct
{
64
uint32_t
iMaxWords
;
// compatible with s_bufhe (total buffer size - header)
65
uint32_t
iType
;
// compatible with s_bufhe, low=type (=100), high=subtype
66
uint32_t
iUsed
;
// not used for iMaxWords>MAX__DLEN (16360), low 16bits only
67
uint32_t
iBuffer
;
// compatible with s_bufhe
68
uint32_t
iElements
;
// compatible with s_bufhe
69
uint32_t
iTemp
;
// Used volatile
70
uint32_t
iTimeSpecSec
;
// compatible with s_bufhe (2*32bit)
71
uint32_t
iTimeSpecNanoSec
;
// compatible with s_bufhe (2*32bit)
72
// struct timespec TimeSpec;
73
uint32_t
iEndian
;
// compatible with s_bufhe free[0]
74
uint32_t
iWrittenEndian
;
// one of LMD__ENDIAN_x
75
uint32_t
iUsedWords
;
// total words without header to read for type=100, free[2]
76
uint32_t
iFree3
;
// free[3]
77
}
sMbsBufferHeader
;
78
79
//--------------------------------------------------
80
// Buffer header, maps s_bufhe
81
typedef
struct
{
82
uint32_t
iMaxWords
;
// compatible with s_bufhe (total buffer size - header)
83
uint32_t
iType
;
// compatible with s_bufhe, low=type (=100), high=subtype
84
lmdoff_t
iTableOffset
;
// optional offset to element offset table in file
85
uint32_t
iElements
;
// compatible with s_bufhe
86
uint32_t
iOffsetSize
;
// Offset size, 4 or 8 [bytes]
87
uint32_t
iTimeSpecSec
;
// compatible with s_bufhe (2*32bit)
88
uint32_t
iTimeSpecNanoSec
;
// compatible with s_bufhe (2*32bit)
89
// struct timespec TimeSpec;
90
uint32_t
iEndian
;
// compatible with s_bufhe free[0]
91
uint32_t
iWrittenEndian
;
// one of LMD__ENDIAN_x
92
uint32_t
iUsedWords
;
// total words without header to read for type=100, free[2]
93
uint32_t
iFree3
;
// free[3]
94
}
sMbsFileHeader
;
95
96
//--------------------------------------------------
97
typedef
struct
{
98
uint32_t
iMaxWords
;
99
uint32_t
iType
;
100
uint32_t
iTimeSpecSec
;
101
uint32_t
iTimeSpecNanoSec
;
102
}
sMbsTimeStamp
;
103
104
//--------------------------------------------------
105
// maps s_evhe
106
typedef
struct
{
107
uint32_t
iWords
;
// following data words
108
uint32_t
iType
;
// compatible with s_ve10_1, low=type (=10), high=subtype
109
}
sMbsHeader
;
110
111
//--------------------------------------------------
112
// maps s_ve10_1
113
typedef
struct
{
114
uint32_t
iWords
;
// data words + 4
115
uint32_t
iType
;
// compatible with s_ve10_1, low=type (=10), high=subtype
116
uint32_t
iTrigger
;
117
uint32_t
iEventNumber
;
118
}
sMbsEventHeader
;
119
120
//--------------------------------------------------
121
// maps s_ves10_1
122
typedef
struct
{
123
uint32_t
iWords
;
// data words + 2
124
uint32_t
iType
;
// compatible with s_ves10_1, low=type (=10), high=subtype
125
uint32_t
iSubeventID
;
// 2 low bytes=procid, next byte=subcrate, high byte control
126
}
sMbsSubeventHeader
;
127
#endif
sMbsSubeventHeader::iWords
uint32_t iWords
Definition:
sMbs.h:123
sMbsBufferHeader
Definition:
sMbs.h:63
sMbsFileHeader::iFree3
uint32_t iFree3
Definition:
sMbs.h:93
sMbsTimeStamp::iTimeSpecNanoSec
uint32_t iTimeSpecNanoSec
Definition:
sMbs.h:101
sMbsTimeStamp
Definition:
sMbs.h:97
sMbsEventHeader::iTrigger
uint32_t iTrigger
Definition:
sMbs.h:116
sMbsBufferHeader::iElements
uint32_t iElements
Definition:
sMbs.h:68
sMbsSubeventHeader::iType
uint32_t iType
Definition:
sMbs.h:124
sMbsBufferHeader::iTimeSpecSec
uint32_t iTimeSpecSec
Definition:
sMbs.h:70
s_stdint.h
sMbsFileHeader
Definition:
sMbs.h:81
sMbsEventHeader
Definition:
sMbs.h:113
sMbsFileHeader::iType
uint32_t iType
Definition:
sMbs.h:83
sMbsTransportInfo
Definition:
sMbs.h:54
sMbsSubeventHeader
Definition:
sMbs.h:122
sMbsBufferHeader::iMaxWords
uint32_t iMaxWords
Definition:
sMbs.h:64
sMbsBufferHeader::iWrittenEndian
uint32_t iWrittenEndian
Definition:
sMbs.h:74
sMbsBufferHeader::iBuffer
uint32_t iBuffer
Definition:
sMbs.h:67
sMbsFileHeader::iTableOffset
lmdoff_t iTableOffset
Definition:
sMbs.h:84
sMbsHeader::iWords
uint32_t iWords
Definition:
sMbs.h:107
sMbsFileHeader::iTimeSpecSec
uint32_t iTimeSpecSec
Definition:
sMbs.h:87
sMbsBufferHeader::iFree3
uint32_t iFree3
Definition:
sMbs.h:76
sMbsBufferHeader::iType
uint32_t iType
Definition:
sMbs.h:65
sMbsEventHeader::iType
uint32_t iType
Definition:
sMbs.h:115
sMbsFileHeader::iTimeSpecNanoSec
uint32_t iTimeSpecNanoSec
Definition:
sMbs.h:88
lmdoff_t
uint64_t lmdoff_t
Definition:
sMbs.h:45
sMbsFileHeader::iMaxWords
uint32_t iMaxWords
Definition:
sMbs.h:82
sMbsFileHeader::iElements
uint32_t iElements
Definition:
sMbs.h:85
sMbsHeader::iType
uint32_t iType
Definition:
sMbs.h:108
sMbsTimeStamp::iTimeSpecSec
uint32_t iTimeSpecSec
Definition:
sMbs.h:100
sMbsBufferHeader::iTimeSpecNanoSec
uint32_t iTimeSpecNanoSec
Definition:
sMbs.h:71
sMbsBufferHeader::iUsedWords
uint32_t iUsedWords
Definition:
sMbs.h:75
sMbsEventHeader::iEventNumber
uint32_t iEventNumber
Definition:
sMbs.h:117
sMbsTransportInfo::iMaxBytes
uint32_t iMaxBytes
Definition:
sMbs.h:56
sMbsBufferHeader::iEndian
uint32_t iEndian
Definition:
sMbs.h:73
sMbsFileHeader::iOffsetSize
uint32_t iOffsetSize
Definition:
sMbs.h:86
sMbsBufferHeader::iTemp
uint32_t iTemp
Definition:
sMbs.h:69
sMbsFileHeader::iUsedWords
uint32_t iUsedWords
Definition:
sMbs.h:92
sMbsEventHeader::iWords
uint32_t iWords
Definition:
sMbs.h:114
sMbsTransportInfo::iEndian
uint32_t iEndian
Definition:
sMbs.h:55
sMbsFileHeader::iEndian
uint32_t iEndian
Definition:
sMbs.h:90
sMbsTransportInfo::iBuffers
uint32_t iBuffers
Definition:
sMbs.h:57
sMbsBufferHeader::iUsed
uint32_t iUsed
Definition:
sMbs.h:66
sMbsTimeStamp::iType
uint32_t iType
Definition:
sMbs.h:99
sMbsTimeStamp::iMaxWords
uint32_t iMaxWords
Definition:
sMbs.h:98
sMbsHeader
Definition:
sMbs.h:106
sMbsTransportInfo::iStreams
uint32_t iStreams
Definition:
sMbs.h:58
sMbsFileHeader::iWrittenEndian
uint32_t iWrittenEndian
Definition:
sMbs.h:91
sMbsSubeventHeader::iSubeventID
uint32_t iSubeventID
Definition:
sMbs.h:125
Generated on Fri Oct 26 2018 08:34:53 for GSI Object Oriented Online Offline (Go4) by
1.8.8