32 sw.lsData1 = lsDatas >> 48;
33 tw.lsData2 = lsDatas & 0x0000ffffffffffff;
35 fw.msData1 = msDatas >> 48;
36 sw.msData2 = msDatas & 0x0000ffffffffffff;
67 uint16_t
mask = 0x0001;
69 uint16_t crc_temp = crc_in;
70 unsigned char datalen = 16;
71 for (
int i = 0;
i < datalen;
i++) {
76 if ((crc_temp &
mask) ^
d)
77 crc_temp = crc_temp >> 1 ^ 0x8408;
79 crc_temp = crc_temp >> 1;
86 uint16_t vfatBlockWords[12];
91 vfatBlockWords[8] = (0xffff000000000000 &
msData()) >> 48;
92 vfatBlockWords[7] = (0x0000ffff00000000 &
msData()) >> 32;
93 vfatBlockWords[6] = (0x00000000ffff0000 &
msData()) >> 16;
94 vfatBlockWords[5] = (0x000000000000ffff &
msData());
95 vfatBlockWords[4] = (0xffff000000000000 &
lsData()) >> 48;
96 vfatBlockWords[3] = (0x0000ffff00000000 &
lsData()) >> 32;
97 vfatBlockWords[2] = (0x00000000ffff0000 &
lsData()) >> 16;
98 vfatBlockWords[1] = (0x000000000000ffff &
lsData());
100 uint16_t crc_fin = 0xffff;
101 for (
int i = 11;
i >= 1;
i--) {
102 crc_fin =
crc_cal(crc_fin, vfatBlockWords[
i]);
uint64_t fw_
phi position of vfat in chamber
uint16_t crc_cal(uint16_t crc_in, uint16_t dato)
uint8_t quality()
quality flag - bit: 0 good, 1 crc fail, 2 b1010 fail, 3 b1100 fail, 4 b1110
unsigned long long uint64_t
VFAT data structure - 3 words of 64 bits each.