Class Bus
Defined in File bus.hpp
Class Documentation
-
class Bus
Inteface class for felix-bus (medium for e-link advertisement)
Public Functions
-
explicit Bus(const std::string &bus_dir, const std::string &bus_group, int dmaid, bool verbose)
Felix-bus constructor. The bus filename is generated automatically using the DMA buffer identifier.
- Parameters:
bus_dir -- bus directory.
bus_group -- bus group name.
dmaid -- DMA buffer number.
verbose -- option for the felix-bus.
-
explicit Bus(const std::string &bus_dir, const std::string &bus_group, const std::string &filename, bool verbose)
Felix-bus constructor with ad-hoc filename.
- Parameters:
bus_dir -- bus directory.
bus_group -- bus group name.
filename -- bus file name, to set a custom file name.
verbose -- option for the felix-bus.
-
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)
Publish on the current bus a list of e-links
- Parameters:
elinks -- vector of elinks.
ip -- local ip for the advertising application.
num_pages -- number of network buffers the client shall allocate.
page_size -- size of network buffers the client shall allocate.
pubsub -- publish/subscribe or send/receive?
unbuffered -- let the client know if unbuffer communication is used.
-
explicit Bus(const std::string &bus_dir, const std::string &bus_group, int dmaid, bool verbose)