|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <sys/socket.h>#include <unistd.h>#include <iostream>#include <string>#include "config/Config.hpp"#include "net/DaqInterface.hpp"Go to the source code of this file.
Functions | |
| static void | check (bool ok, const std::string &what) |
| static fsw::config::Config | makeConfig (const std::string &board_prefix, const std::string &bind_ip="") |
| A config with two boards on the given subnet, and an optional explicit [network].bind_ip. | |
| int | main () |
Variables | |
| static int | g_failures = 0 |
| Which NIC board traffic leaves from. | |
|
static |
Definition at line 28 of file test_daq_interface.cpp.
References g_failures, and ok.
Referenced by main().
| int main | ( | ) |
Definition at line 47 of file test_daq_interface.cpp.
References fsw::net::bindToDaqInterface(), check(), g_failures, makeConfig(), r, and fsw::net::resolveDaqBindAddress().
|
static |
A config with two boards on the given subnet, and an optional explicit [network].bind_ip.
Definition at line 35 of file test_daq_interface.cpp.
References fsw::config::load_from_string().
Referenced by main().
|
static |
Which NIC board traffic leaves from.
The DAQ used to own its machine, so an unbound socket and "the board NIC" were the same thing. It now shares the apps box with the Docker stack and the site LAN, and resolveDaqBindAddress() is what re-establishes the guarantee. Every sender in the pipeline routes through it, so its four outcomes are pinned here rather than left to be discovered on a rig.
Addresses are chosen so the results do not depend on the machine running the test:
The ambiguous case (two interfaces on the board subnet) is deliberately not tested: it cannot be produced without adding an address to the host, which a unit test has no business doing.
Definition at line 26 of file test_daq_interface.cpp.