-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTypeId.cc
More file actions
35 lines (27 loc) · 748 Bytes
/
Copy pathTypeId.cc
File metadata and controls
35 lines (27 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "pdsdata/xtc/TypeId.hh"
using namespace Pds;
TypeId::TypeId(Type type, uint32_t version) :
_value((version<<16)|type) {}
TypeId::TypeId(const TypeId& v) : _value(v._value) {}
uint32_t TypeId::value() const {return _value;}
uint32_t TypeId::version() const {return (_value&0xffff0000)>>16;}
TypeId::Type TypeId::id() const {return (TypeId::Type)(_value&0xffff);}
const char* TypeId::name(Type type)
{
static const char* _names[] = {
"Any",
"Xtc",
"Frame",
"AcqWaveform",
"AcqConfig",
"TwoDGaussian",
"Opal1kConfig",
"FrameFexConfig",
"EvrConfig",
"TM6740Config",
"RunControlConfig",
"pnCCDframe",
"pnCCDconfig"
};
return (type < NumberOf ? _names[type] : "-Invalid-");
}