|
McStas Readout Master 0.3.3
|
Explicit EFU endpoint configuration for replay, parsed from JSON. More...
#include <SenderConfigs.h>
Public Member Functions | |
| SenderConfigs (const std::string &json_text) | |
| Equivalent to from_json(). | |
| void | parse (const std::string &json_text) |
| Replace the held configurations with those parsed from json_text. | |
| bool | empty () const noexcept |
| std::size_t | size () const noexcept |
| bool | contains (DetectorType detector_type, ReadoutType readout_type) const |
| True when an endpoint is configured for the pair. | |
| std::optional< SenderConfig > | find (DetectorType detector_type, ReadoutType readout_type) const |
| The endpoint for the pair, or std::nullopt when not configured. | |
| const SenderConfig & | at (DetectorType detector_type, ReadoutType readout_type) const |
| The endpoint for the pair; throws std::out_of_range when not configured. | |
Static Public Member Functions | |
| static SenderConfigs | from_json (const std::string &json_text) |
| Parse a JSON document; throws std::runtime_error describing the first invalid entry. | |
| static SenderConfigs | from_file (const std::filesystem::path &path) |
| Read and parse a JSON file; throws std::runtime_error if unreadable or invalid. | |
Explicit EFU endpoint configuration for replay, parsed from JSON.
Replay resolves the EFU for each collector group from, in precedence order: this explicit configuration, attributes embedded in the collector file, then command-line defaults. The JSON layout is an object with one senders array; each entry requires detector_type and readout_type (bare or qualified enum names), ip_address, udp_port, and tcp_port. Entries whose detector and readout do not belong together, and duplicate (detector, readout) pairs, are rejected.
Definition at line 35 of file SenderConfigs.h.
|
inlinenoexcept |
Definition at line 49 of file SenderConfigs.h.
|
inlinenoexcept |
Definition at line 50 of file SenderConfigs.h.