Skip to content

Class ILLIXR::udp_network_backend

ClassList > ILLIXR > udp_network_backend

More...

  • #include <plugin.hpp>

Inherits the following classes: ILLIXR::plugin, ILLIXR::network::udp_backend

Public Attributes

Type Name
bool client

Public Functions

Type Name
virtual bool is_topic_networked (std::string topic_name) override
void read_loop (network::UDPSocket * socket)
virtual void start_client () override
virtual void start_server () override
virtual void stop () override
A method which Spindle calls when it stops the component.
virtual void topic_create (std::string topic_name, network::topic_config & config) override
void topic_receive (const std::string & topic_name, std::vector< char > & message)
virtual void topic_send (std::string topic_name, std::string && message) override
virtual network::topic_config::TransportMethod transport_method () override const
udp_network_backend (const std::string & name_, phonebook * pb_)
~udp_network_backend () override

Public Functions inherited from ILLIXR::plugin

See ILLIXR::plugin

Type Name
std::string get_name () noexcept const
plugin (std::string name, phonebook * pb)
void spd_add_file_sink (const std::string & file_name, const std::string & extension, const std::string & log_level)
auto spdlogger (const char * log_level)
virtual void start ()
A method which Spindle calls when it starts the component.
virtual void stop ()
A method which Spindle calls when it stops the component.
virtual ~plugin () = default

Public Functions inherited from ILLIXR::network::network_backend

See ILLIXR::network::network_backend

Type Name
virtual bool is_topic_networked (std::string topic_name) = 0
virtual void start_client () = 0
virtual void start_server () = 0
virtual void topic_create (std::string topic_name, topic_config & config) = 0
virtual void topic_send (std::string topic_name, std::string && message) = 0
virtual network::topic_config::TransportMethod transport_method () const = 0

Public Functions inherited from ILLIXR::phonebook::service

See ILLIXR::phonebook::service

Type Name
virtual ~service () = default

Protected Attributes inherited from ILLIXR::plugin

See ILLIXR::plugin

Type Name
const std::size_t id_
std::string name_
const phonebook * phonebook_
std::shared_ptr< spdlog::logger > plugin_logger_
const std::shared_ptr< record_logger > record_logger_

Detailed Description

Switchboard UDP transport for tracking and small control messages. Each logical topic message uses the original single-datagram format; large payloads such as video frames use the TCP backend.

Public Attributes Documentation

variable client

bool ILLIXR::udp_network_backend::client;

Public Functions Documentation

function is_topic_networked

virtual bool ILLIXR::udp_network_backend::is_topic_networked (
    std::string topic_name
) override

Used to query if a topic is networked.

The backend should coordinate with the other endpoints to determine if a topic is networked. There are two cases where this should return true: * topic_create has been called with the same topic_name * topic_create has not been called with the same topic_name, but the topic is networked by another endpoint The backend implementation should coordinate with the other endpoints to determine if a topic is networked.

Parameters:

  • topic_name The name of the topic.

Implements ILLIXR::network::network_backend::is_topic_networked


function read_loop

void ILLIXR::udp_network_backend::read_loop (
    network::UDPSocket * socket
) 

function start_client

virtual void ILLIXR::udp_network_backend::start_client () override

Implements ILLIXR::network::network_backend::start_client


function start_server

virtual void ILLIXR::udp_network_backend::start_server () override

Implements ILLIXR::network::network_backend::start_server


function stop

A method which Spindle calls when it stops the component.

virtual void ILLIXR::udp_network_backend::stop () override

This is necessary because the parent class might define some actions that need to be taken prior to destructing the derived class. For example, threadloop must halt and join the thread before the derived class can be safely destructed. However, the derived class's destructor is called before its parent (threadloop), so threadloop doesn't get a chance to join the thread before the derived class is destroyed, and the thread accesses freed memory. Instead, we call plugin->stop manually before destroying anything.

Concrete plugins are responsible for initializing their specific logger and sinks.

Implements ILLIXR::plugin::stop


function topic_create

virtual void ILLIXR::udp_network_backend::topic_create (
    std::string topic_name,
    network::topic_config & config
) override

Called when a topic is created.

The backend must maintain a list of networked topics. This adds a topic to that list.

Parameters:

  • topic_name The name of the topic.
  • config The configuration of the topic.

Implements ILLIXR::network::network_backend::topic_create


function topic_receive

void ILLIXR::udp_network_backend::topic_receive (
    const std::string & topic_name,
    std::vector< char > & message
) 

function topic_send

virtual void ILLIXR::udp_network_backend::topic_send (
    std::string topic_name,
    std::string && message
) override

Called when a message is requested to be sent on a topic by a plugin.

Parameters:

  • topic_name The name of the topic.
  • message The message to send.

Implements ILLIXR::network::network_backend::topic_send


function transport_method

inline virtual network::topic_config::TransportMethod ILLIXR::udp_network_backend::transport_method () override const

Implements ILLIXR::network::network_backend::transport_method


function udp_network_backend

explicit ILLIXR::udp_network_backend::udp_network_backend (
    const std::string & name_,
    phonebook * pb_
) 

function ~udp_network_backend

ILLIXR::udp_network_backend::~udp_network_backend () override


The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR/illixr_release/ILLIXR/plugins/udp_network_backend/plugin.hpp