Send some data

This commit is contained in:
2020-04-22 12:41:01 +02:00
parent cccba2f771
commit 09a46daea0
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -129,7 +129,8 @@ int main (int argc, char *argv[]) {
if ((i_frame>0) && (i_frame % 100 == 0)) {
// Waiting to send more.
zmq_recv(more_socket, nullptr, 0, 0);
uint64_t test = 0;
zmq_recv(more_socket, &test, sizeof(test), 0);
}
}
}
+5 -2
View File
@@ -6,6 +6,7 @@
#include <RingBuffer.hpp>
#include <BufferUtils.hpp>
#include <jungfrau.hpp>
#include <unordered_map>
using namespace std;
@@ -58,7 +59,7 @@ int main (int argc, char *argv[])
auto metadata_buffer = make_unique<ModuleFrame>();
auto image_buffer = make_unique<uint16_t[]>(512 * 1024);
auto received_counter = unordered_map<uint64_t, int>();
unordered_map<uint64_t, int> received_counter;
while (true) {
auto n_bytes_metadata = zmq_recv(
@@ -97,7 +98,9 @@ int main (int argc, char *argv[])
cout << "n frames in progress " << n_in_progress_frames << endl;
if (n_in_progress_frames == 0) {
zmq_send(more_socket, nullptr, 0, 0);
uint64_t test = 0;
zmq_send(more_socket, &test, sizeof(test), 0);
cout << "SENT!!!" << endl;
}
}