Program Listing for File bus.hpp
↰ Return to documentation for file (bus.hpp
)
#ifndef FELIX_BUS_H_
#define FELIX_BUS_H_
#include <string>
#include <vector>
#include "elink.hpp"
#include "log.hpp"
#include "felixbus/felixbus.hpp"
class FelixBus;
class Bus
{
public:
explicit Bus(const std::string& bus_dir, const std::string& bus_group, int dmaid, bool verbose);
explicit Bus(const std::string& bus_dir, const std::string& bus_group, const std::string& filename, bool verbose);
Bus(const Bus &) = delete;
Bus &operator=(const Bus &) = delete;
bool publish(const std::vector<Elink> &elinks,
const std::string &ip, uint32_t port,
uint32_t num_pages = 0, uint32_t page_size = 0,
bool pubsub = true, bool unbuffered = false);
private:
std::string m_felix_bus_path;
felixbus::FelixBus m_bus;
};
#endif /* FELIX_BUS_H_ */