-
Notifications
You must be signed in to change notification settings - Fork 0
/
HVPS.cc
44 lines (31 loc) · 1.05 KB
/
HVPS.cc
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
36
37
38
39
40
41
42
43
44
/*
-------------------------------------------------------------------------
OBJECT NAME: HVPS.cc
FULL NAME: HVPS Probe Class
DESCRIPTION:
COPYRIGHT: University Corporation for Atmospheric Research, 1997-2024
-------------------------------------------------------------------------
*/
#include "HVPS.h"
#include "OAPUserConfig.h"
#include "portable.h"
using namespace OAP;
/* -------------------------------------------------------------------- */
HVPS::HVPS(UserConfig *cfg, const char xml_entry[], int recSize)
: SpecProbe(HVPS_T, cfg, xml_entry, recSize)
{
_armWidth = 203.0;
// SPEC Type32 uses a 32 bit timing word.
_packetFormat = Type32;
_timingMask = 0x00000000ffffffffLL;
SetSampleArea();
printf("HVPS::OAP id=%s, name=%s, resolution=%zu, armWidth=%f, eaw=%f\n", _code, _name.c_str(), _resolution, _armWidth, _eaw);
}
/* -------------------------------------------------------------------- */
uint64_t HVPS::timeWordDiff(uint64_t val1, uint64_t val2)
{
if (val1 < val2)
val2 = 4294967296 - val2;
return val1 - val2;
}
// END HVPS.CC