79 static const uint8_t NGET4 = 80;
84 static uint32_t lastGlobalEpoch = 0;
85 uint32_t nGet4, epoch, msgType;
86 static int32_t pEpochDiff[NGET4];
94 static uint32_t procEpochUntilError = 0;
97 fdTsStartTime =
static_cast<Double_t
>(ts.descriptor(0, 0).idx);
109 <<
" Overlap MS, for a core duration of " <<
fdTsCoreSizeInNs <<
" ns and a full duration of "
115 LOG(info) <<
"In each TS " <<
fuNbMsLoop <<
" MS will be looped over";
127 auto msDescriptor = ts.descriptor(uMsComp,
fuMsIndex);
129 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp,
fuMsIndex));
131 uint32_t uSize = msDescriptor.size;
135 <<
" has size: " << uSize;
138 LOG(info) <<
"---------------------------------------------------------------";
143 LOG(error) <<
"The input microslice buffer does NOT "
144 <<
"contain only complete gDPB messages!";
150 const uint64_t* pInBuff =
reinterpret_cast<const uint64_t*
>(msContent);
151 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
153 uint64_t ulData =
static_cast<uint64_t
>(pInBuff[uIdx]);
161 msgType = ulData & 0xF;
162 nGet4 = (ulData >> 40) & 0xFF;
163 epoch = (ulData >> 8) & 0xFFFFFF;
175 if ((ulData & 0xFFFFFFFFFFFF) == 0xdeadbeeeeeef) {}
177 else if (msgType == 0x01) {
180 procEpochUntilError++;
181 if (lastGlobalEpoch != 0xFFFFFF) {
182 if ((lastGlobalEpoch + 1) != epoch) {
184 snprintf(buf,
sizeof(buf),
185 "Error global epoch, last epoch, current epoch, diff 0x%06x 0x%06x %d 0x%016lx %d",
186 lastGlobalEpoch, epoch, lastGlobalEpoch - epoch,
static_cast<size_t>(ulData),
187 procEpochUntilError);
189 std::cout << buf << std::endl;
190 procEpochUntilError = 0;
194 snprintf(buf,
sizeof(buf),
"Global epoch overflow, last epoch, current epoch 0x%06x 0x%06x",
195 lastGlobalEpoch, epoch);
197 std::cout << buf << std::endl;
201 lastGlobalEpoch = epoch;
202 snprintf(buf,
sizeof(buf),
"Global epoch %d", epoch);
203 std::cout << Form(
"%5d/%5d ", uIdx, uNbMessages) << buf << std::endl;
205 else if (nGet4 <= 120) {
207 if (lastGlobalEpoch > epoch) epochDiff = lastGlobalEpoch - epoch;
209 epochDiff = 0xFFFFFF + lastGlobalEpoch - epoch;
211 if (epochDiff != pEpochDiff[nGet4]) {
214 "eTime %d - Error epoch drift Get4 %3d , last epoch diff, current epoch diff 0x%06x 0x%06x %d",
215 lastGlobalEpoch, nGet4, pEpochDiff[nGet4], epochDiff, pEpochDiff[nGet4] - epochDiff);
216 std::cout << buf << std::endl;
219 pEpochDiff[nGet4] = epochDiff;