NDEVR
API Documentation
ConnectionInfo

A structure designed to store information about a specific Connection. More...

Collaboration diagram for ConnectionInfo:
[legend]

Public Member Functions

 ConnectionInfo (const StringView &id)
 Constructs a ConnectionInfo by parsing a combined type|address identifier.
void autoSetName ()
 Automatically sets the display name from the connection identifier.
String id () const
 Returns a unique identifier string combining the type and address.
bool operator!= (const ConnectionInfo &other) const
 Inequality comparison operator.
void setID (const StringView &id)
 Parses a combined "type|address" string and sets the type and address fields.

Public Attributes

String address
 The address or port of the connection.
ConnectionOpenType connect_mode = ConnectionOpenType::e_read_write
 The mode in which to open the connection.
LogPtr log
 Log used for connection diagnostics.
TimeSpan max_timeout = TimeSpan(5.0)
 Maximum time to wait for a connection before timing out.
TranslatedString name
 Human-readable display name for the connection.
String thread_id
 If set, connection must be executed on a specific thread.
String type
 The connection type (e.g., "serial", "tcp", "bluetooth").

Detailed Description

A structure designed to store information about a specific Connection.


Definition at line 89 of file Connection.h.

Constructor & Destructor Documentation

◆ ConnectionInfo()

ConnectionInfo::ConnectionInfo ( const StringView & id)
inline

Constructs a ConnectionInfo by parsing a combined type|address identifier.

Parameters
[in]idThe connection identifier in "type|address" format.

Definition at line 96 of file Connection.h.

References setID().

Member Function Documentation

◆ id()

String ConnectionInfo::id ( ) const
inline

Returns a unique identifier string combining the type and address.

Returns
The connection identifier in "type|address" format.

Definition at line 112 of file Connection.h.

References address, and type.

◆ operator!=()

bool ConnectionInfo::operator!= ( const ConnectionInfo & other) const

Inequality comparison operator.

Parameters
[in]otherThe other ConnectionInfo to compare against.
Returns
True if any field differs from other.

◆ setID()

void ConnectionInfo::setID ( const StringView & id)

Parses a combined "type|address" string and sets the type and address fields.

Parameters
[in]idThe connection identifier to parse.

Referenced by ConnectionInfo().


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