Merge branch 'developer' into feature/remove-factories

This commit is contained in:
Bechir Braham
2024-04-11 17:33:29 +02:00
20 changed files with 321 additions and 53 deletions

View File

@ -1,14 +1,41 @@
#include "aare/network_io/ZmqSocketReceiver.hpp"
#include "aare/network_io/defs.hpp"
#include <boost/program_options.hpp>
#include <cassert>
#include <fmt/core.h>
#include <string>
using namespace aare;
namespace po = boost::program_options;
using namespace std;
int main() {
int main(int argc, char **argv) {
aare::logger::set_verbosity(aare::logger::DEBUG);
std::string endpoint = "tcp://localhost:5555";
po::options_description desc("options");
desc.add_options()("help", "produce help message")("port,p", po::value<uint16_t>()->default_value(5555),
"port number");
po::positional_options_description pd;
pd.add("port", 1);
po::variables_map vm;
try {
auto parsed = po::command_line_parser(argc, argv).options(desc).positional(pd).run();
po::store(parsed, vm);
po::notify(vm);
} catch (const boost::program_options::error &e) {
cout << e.what() << "\n";
cout << desc << "\n";
return 1;
}
if (vm.count("help")) {
cout << desc << "\n";
return 1;
}
auto port = vm["port"].as<uint16_t>();
std::string endpoint = "udp://127.0.0.1:" + std::to_string(port);
aare::ZmqSocketReceiver socket(endpoint);
socket.connect();
while (true) {

View File

@ -79,7 +79,7 @@ int main(int argc, char **argv) {
header.npixelsx = frame.rows();
header.npixelsy = frame.cols();
header.dynamicRange = frame.bitdepth();
header.imageSize = frame.size();
header.size = frame.size();
sender.send({header, frame});
std::this_thread::sleep_for(d);

View File

@ -24,7 +24,7 @@ int main() {
aare::ZmqHeader header;
header.npixelsx = 1024;
header.npixelsy = 1024;
header.imageSize = sizeof(uint32_t) * 1024 * 1024;
header.size = sizeof(uint32_t) * 1024 * 1024;
header.dynamicRange = 32;
std::vector<ZmqFrame> zmq_frames;