RDMnet  0.3.0
Implementation of ANSI E1.33 (RDMnet)
View other versions:
rdmnet::ClientConnectFailedInfo Class Reference

Overview

Information about a failed connection to a broker delivered to an RDMnet callback function.

Not valid for use other than as a parameter to an RDMnet callback function. Extract the members to save them for later use.

#include <rdmnet/cpp/client.h>

Public Member Functions

 ClientConnectFailedInfo ()=delete
 Not default-constructible.
 
 ClientConnectFailedInfo (const ClientConnectFailedInfo &other)=delete
 Not copyable.
 
ClientConnectFailedInfooperator= (const ClientConnectFailedInfo &other)=delete
 Not copyable.
 
constexpr ClientConnectFailedInfo (const RdmnetClientConnectFailedInfo &c_info) noexcept
 Construct a ClientConnectFailedInfo which references an instance of the C RdmnetClientConnectFailedInfo type.
 
constexpr rdmnet_connect_fail_event_t event () const noexcept
 Get the high-level reason that this connection failed.
 
constexpr etcpal::Error socket_err () const noexcept
 Get the system error code associated with the failure. More...
 
constexpr rdmnet_connect_status_t rdmnet_reason () const noexcept
 Get the reason given in the RDMnet-level connection refuse message. More...
 
constexpr bool will_retry () const noexcept
 Whether the connection will be retried automatically. More...
 
constexpr bool HasSocketErr () const noexcept
 Whether the value returned from socket_err() is valid.
 
constexpr bool HasRdmnetReason () const noexcept
 Whether the value returned from rdmnet_reason() is valid.
 
const char * EventToCString () const noexcept
 Get the high-level reason that this connection failed as a C-style string.
 
std::string EventToString () const
 Get the high-level reason that this connection failed as a string.
 
const char * RdmnetReasonToCString () const noexcept
 Get the reason given in the RDMnet-level connection refuse message as a C-style string.
 
std::string RdmnetReasonToString () const
 Get the reason given in the RDMnet-level connection refuse message as a string.
 
constexpr const RdmnetClientConnectFailedInfoget () const noexcept
 Get a const reference to the underlying C type.
 

Member Function Documentation

◆ rdmnet_reason()

constexpr rdmnet_connect_status_t rdmnet::ClientConnectFailedInfo::rdmnet_reason ( ) const
constexprnoexcept

Get the reason given in the RDMnet-level connection refuse message.

Valid if HasRdmnetReason() == true.

◆ socket_err()

constexpr etcpal::Error rdmnet::ClientConnectFailedInfo::socket_err ( ) const
constexprnoexcept

Get the system error code associated with the failure.

Valid if HasSocketErr() == true.

◆ will_retry()

constexpr bool rdmnet::ClientConnectFailedInfo::will_retry ( ) const
constexprnoexcept

Whether the connection will be retried automatically.

If this is true, the connection will be retried on the relevant scope; expect further notifications of connection success or failure. If false, the rdmnet_client_scope_t handle associated with the scope is invalidated, and the scope must be created again. This indicates that the connection failed for a reason that usually must be corrected by a user or application developer. Some possible reasons for this to be false include:

  • The wrong scope was specified for a statically-configured broker
  • A static UID was given that was invalid

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