SRS-control 0.1.4
Loading...
Searching...
No Matches
srs::connection::Stopper Class Reference

#include <Connections.hpp>

Collaboration diagram for srs::connection::Stopper:

Public Member Functions

 Stopper (const Stopper &)=delete
 Deleted copy constructor (rule of 5).
 Stopper (Stopper &&)=delete
 Deleted move constructor (rule of 5).
Stopperoperator= (const Stopper &)=delete
 Deleted copy assignment operator (rule of 5).
Stopperoperator= (Stopper &&)=delete
 Deleted move assignment operator (rule of 5).
 Stopper (const Info &info)
 Constructor for Stopper connection class.
 ~Stopper ()=default
 Destructor for Stopper connection class.
void on_fail ()
 called if an error occurs
void acq_off ()
 Turn off the data acquisition from SRS system.
Public Member Functions inherited from srs::connection::Base< buffer_size >
 Base (const Info &info, std::string name)
void read_data_handle (std::span< BufferElementType > read_data)
void close ()
void on_fail ()
auto get_executor ()
void listen (this auto &&self, bool is_non_stop=false)
void communicate (this auto &&self, const std::vector< CommunicateEntryType > &data, uint16_t address)
auto send_continuous_message () -> asio::experimental::coro< int(std::optional< std::string_view >)>
void set_socket (std::unique_ptr< asio::ip::udp::socket > socket)
void set_remote_endpoint (asio::ip::udp::endpoint endpoint)
void set_timeout_seconds (int val)
void set_send_message (const RangedData auto &msg)
auto get_read_msg_buffer () const -> const ReadBufferType< buffer_size > &
auto get_name () const -> const std::string &
auto get_app () -> App &
auto get_socket () -> const udp::socket &
auto get_remote_endpoint () -> const udp::endpoint &
auto get_local_port_number () const -> int
auto is_continuous () const -> bool

Additional Inherited Members

Protected Member Functions inherited from srs::connection::Base< buffer_size >
auto new_shared_socket (int port_number) -> std::unique_ptr< udp::socket >
void close_socket ()
void set_continuous (bool is_continuous=true)
void set_connection_bad ()
auto is_connection_ok () -> bool

Detailed Description

Definition at line 37 of file Connections.hpp.

Constructor & Destructor Documentation

◆ Stopper() [1/3]

srs::connection::Stopper::Stopper ( const Stopper & )
delete

Deleted copy constructor (rule of 5).

◆ Stopper() [2/3]

srs::connection::Stopper::Stopper ( Stopper && )
delete

Deleted move constructor (rule of 5).

◆ Stopper() [3/3]

srs::connection::Stopper::Stopper ( const Info & info)
inlineexplicit

Constructor for Stopper connection class.

Parameters
infoconnection information

Definition at line 65 of file Connections.hpp.

◆ ~Stopper()

srs::connection::Stopper::~Stopper ( )
default

Destructor for Stopper connection class.

The destructor change the Status::is_acq_off to be true

See also
Status

Member Function Documentation

◆ acq_off()

void srs::connection::Stopper::acq_off ( )

Turn off the data acquisition from SRS system.

This is the primary execution from the Stopper class. It first checks if the Status::is_acq_on from the App is true. If the status is still false after 4 seconds, an exception will be thrown. If the status is true, member function connection::Base::communicate would be called.

See also
connection::Base::communicate

Definition at line 19 of file Connections.cpp.

◆ on_fail()

void srs::connection::Stopper::on_fail ( )
inline

called if an error occurs

Definition at line 81 of file Connections.hpp.

◆ operator=() [1/2]

Stopper & srs::connection::Stopper::operator= ( const Stopper & )
delete

Deleted copy assignment operator (rule of 5).

◆ operator=() [2/2]

Stopper & srs::connection::Stopper::operator= ( Stopper && )
delete

Deleted move assignment operator (rule of 5).


The documentation for this class was generated from the following files: