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

#include <ConnectionBase.hpp>

Collaboration diagram for srs::connection::CommandBase:

Public Member Functions

 CommandBase (const std::string_view name)
void send_message_from (this auto &&self, const std::shared_ptr< FecCommandSocket > &socket)
auto check_response (std::span< char > response_msg) const -> bool
void set_remote_endpoint (asio::ip::udp::endpoint endpoint)
auto get_name () const -> std::string_view
auto get_remote_endpoint () -> const udp::endpoint &
auto get_response_msg () const -> std::string_view
auto get_remote_ip_string () const
auto get_remote_port () const

Protected Member Functions

void set_write_response_msg (const std::vector< CommunicateEntryType > &msg, uint16_t address)

Private Member Functions

void communicate (this auto &&self, std::span< const CommunicateEntryType > data, uint16_t address, const std::shared_ptr< FecCommandSocket > &socket)

Static Private Member Functions

static void encode_write_msg (process::SerializableMsgBuffer &buffer, uint32_t counter, std::span< const CommunicateEntryType > data, uint16_t address)
static auto timer_countdown (auto *connection) -> asio::awaitable< void >
static auto send_message (std::shared_ptr< FecCommandSocket > socket, std::shared_ptr< CommandBase > connection) -> asio::awaitable< void >

Private Attributes

uint32_t counter_ = common::INIT_COUNT_VALUE
udp::endpoint remote_endpoint_
process::SerializableMsgBuffer write_msg_buffer_
process::SerializableMsgBuffer write_msg_response_buffer_
std::string_view name_

Detailed Description

Definition at line 26 of file ConnectionBase.hpp.

Constructor & Destructor Documentation

◆ CommandBase()

srs::connection::CommandBase::CommandBase ( const std::string_view name)
inlineexplicit

Definition at line 29 of file ConnectionBase.hpp.

Member Function Documentation

◆ check_response()

auto srs::connection::CommandBase::check_response ( std::span< char > response_msg) const->bool
nodiscard

Definition at line 53 of file ConnectionBase.cpp.

◆ communicate()

void srs::connection::CommandBase::communicate ( this auto && self,
std::span< const CommunicateEntryType > data,
uint16_t address,
const std::shared_ptr< FecCommandSocket > & socket )
inlineprivate

Definition at line 74 of file ConnectionBase.hpp.

◆ encode_write_msg()

void srs::connection::CommandBase::encode_write_msg ( process::SerializableMsgBuffer & buffer,
uint32_t counter,
std::span< const CommunicateEntryType > data,
uint16_t address )
staticprivate

Definition at line 38 of file ConnectionBase.cpp.

◆ get_name()

auto srs::connection::CommandBase::get_name ( ) const->std::string_view
inlinenodiscard

Definition at line 45 of file ConnectionBase.hpp.

◆ get_remote_endpoint()

auto srs::connection::CommandBase::get_remote_endpoint ( ) ->constudp::endpoint &
inline

Definition at line 46 of file ConnectionBase.hpp.

◆ get_remote_ip_string()

auto srs::connection::CommandBase::get_remote_ip_string ( ) const
inlinenodiscard

Definition at line 48 of file ConnectionBase.hpp.

◆ get_remote_port()

auto srs::connection::CommandBase::get_remote_port ( ) const
inlinenodiscard

Definition at line 49 of file ConnectionBase.hpp.

◆ get_response_msg()

auto srs::connection::CommandBase::get_response_msg ( ) const->std::string_view
inlinenodiscard

Definition at line 47 of file ConnectionBase.hpp.

◆ send_message()

auto srs::connection::CommandBase::send_message ( std::shared_ptr< FecCommandSocket > socket,
std::shared_ptr< CommandBase > connection )->asio::awaitable< void >
staticprivate

Definition at line 21 of file ConnectionBase.cpp.

◆ send_message_from()

void srs::connection::CommandBase::send_message_from ( this auto && self,
const std::shared_ptr< FecCommandSocket > & socket )
inline

Definition at line 34 of file ConnectionBase.hpp.

◆ set_remote_endpoint()

void srs::connection::CommandBase::set_remote_endpoint ( asio::ip::udp::endpoint endpoint)
inline

Definition at line 42 of file ConnectionBase.hpp.

◆ set_write_response_msg()

void srs::connection::CommandBase::set_write_response_msg ( const std::vector< CommunicateEntryType > & msg,
uint16_t address )
inlineprotected

Definition at line 52 of file ConnectionBase.hpp.

◆ timer_countdown()

auto srs::connection::CommandBase::timer_countdown ( auto * connection) ->asio::awaitable< void >
staticprivate

Member Data Documentation

◆ counter_

uint32_t srs::connection::CommandBase::counter_ = common::INIT_COUNT_VALUE
private

Definition at line 58 of file ConnectionBase.hpp.

◆ name_

std::string_view srs::connection::CommandBase::name_
private

Definition at line 62 of file ConnectionBase.hpp.

◆ remote_endpoint_

udp::endpoint srs::connection::CommandBase::remote_endpoint_
private

Definition at line 59 of file ConnectionBase.hpp.

◆ write_msg_buffer_

process::SerializableMsgBuffer srs::connection::CommandBase::write_msg_buffer_
private

Definition at line 60 of file ConnectionBase.hpp.

◆ write_msg_response_buffer_

process::SerializableMsgBuffer srs::connection::CommandBase::write_msg_response_buffer_
private

Definition at line 61 of file ConnectionBase.hpp.


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