#include RedisProvider::RedisProvider() { setKey("DAQ_key"); this->stream = rediscpp::make_stream("localhost", "6379"); } RedisProvider::RedisProvider(std::string ip, int port, std::string key) { setKey(key); this->stream = rediscpp::make_stream(ip, std::to_string(port)); } int RedisProvider::write(BasePacket &packet) { return 1; } int RedisProvider::write(BasePacket &packet, std::string key) { return 1; } int RedisProvider::open() { try { auto response = rediscpp::execute(*stream, "ping"); return 1; } catch (std::exception const &e) { std::cerr << "Error: " << e.what() << std::endl; return EXIT_FAILURE; } } int RedisProvider::close() { return 1; }