get number of missing packets now returns signed so negative numbers mean extra packets

This commit is contained in:
2022-02-22 10:27:22 +01:00
parent bf1df92303
commit 8f632db2a0
8 changed files with 15 additions and 16 deletions

View File

@@ -870,7 +870,7 @@ int64_t Module::getFramesCaughtByReceiver() const {
return sendToReceiver<int64_t>(F_GET_RECEIVER_FRAMES_CAUGHT);
}
std::vector<uint64_t> Module::getNumMissingPackets() const {
std::vector<int64_t> Module::getNumMissingPackets() const {
// TODO!(Erik) Refactor
LOG(logDEBUG1) << "Getting num missing packets";
if (shm()->useReceiverFlag) {
@@ -882,7 +882,7 @@ std::vector<uint64_t> Module::getNumMissingPackets() const {
" returned error: " + client.readErrorMessage());
} else {
auto nports = client.Receive<int>();
std::vector<uint64_t> retval(nports);
std::vector<int64_t> retval(nports);
client.Receive(retval);
LOG(logDEBUG1) << "Missing packets of Receiver" << moduleIndex
<< ": " << sls::ToString(retval);