SRS-control 0.1.4
Loading...
Searching...
No Matches
Connections.cpp
Go to the documentation of this file.
3
4namespace srs::connection
5{
7 {
9 auto& control = get_app();
10 control.set_status_acq_on();
11 control.notify_status_change();
12 if (is_connection_ok())
13 {
14 spdlog::info("Input data stream from the FEC with the IP: {} has been requested",
15 get_remote_endpoint().address().to_string());
16 }
17 }
18
20 {
21 const auto data = std::vector<CommunicateEntryType>{ 0, 15, 0 };
23 }
24
26 {
27 spdlog::debug("Stopping the UDP data reading ...");
29 auto& control = get_app();
30 control.set_status_is_reading(false);
31 spdlog::trace("Reading status is not false");
32 control.notify_status_change();
33 spdlog::info("UDP Data reading has been stopped");
34 }
35
36 void DataReader::read_data_handle(std::span<BufferElementType> read_data)
37 {
38
39 workflow_handler_->read_data_once(read_data);
40 }
41} // namespace srs::connection
auto is_connection_ok() -> bool
auto get_remote_endpoint() -> const udp::endpoint &
void communicate(this auto &&self, const std::vector< CommunicateEntryType > &data, uint16_t address)
auto get_app() -> App &
gsl::not_null< workflow::Handler * > workflow_handler_
void read_data_handle(std::span< BufferElementType > read_data)
void acq_off()
Turn off the data acquisition from SRS system.
constexpr auto NULL_ADDRESS