Fast DDS  Version 3.6.1.0
Fast DDS
Locator_t Class Reference

Class Locator_t, uniquely identifies a communication channel for a particular transport. More...

#include <Locator.hpp>

Inheritance diagram for Locator_t:
LocatorWithMask

Public Member Functions

 Locator_t ()
 Default constructor. More...
 
 Locator_t (Locator_t &&loc)
 Move constructor. More...
 
 Locator_t (const Locator_t &loc)
 Copy constructor. More...
 
 Locator_t (uint32_t portin)
 Port constructor. More...
 
 Locator_t (int32_t kindin, uint32_t portin)
 Kind and port constructor. More...
 
Locator_toperator= (const Locator_t &loc)
 Copy assignment. More...
 
bool set_address (const Locator_t &other)
 Set the locator IP address using another locator. More...
 
octetget_address ()
 Getter for the locator IP address. More...
 
octet get_address (uint16_t field) const
 Getter for a specific field of the locator IP address. More...
 
void set_Invalid_Address ()
 Automatic setter for setting locator IP address to invalid address (0). More...
 

Static Public Member Functions

static Locator_t create_locator (int32_t kind, const std::string &address, uint32_t port)
 Create a locator with the given parameters. More...
 

Public Attributes

int32_t kind
 Specifies the locator type. More...
 
uint32_t port
 Network port. More...
 
octet address [16]
 IP address. More...
 

Detailed Description

Class Locator_t, uniquely identifies a communication channel for a particular transport.

For example, an address + port combination in the case of UDP.

Constructor & Destructor Documentation

◆ Locator_t() [1/5]

Locator_t ( )
inline

Default constructor.

◆ Locator_t() [2/5]

Locator_t ( Locator_t &&  loc)
inline

Move constructor.

◆ Locator_t() [3/5]

Locator_t ( const Locator_t loc)
inline

Copy constructor.

◆ Locator_t() [4/5]

Locator_t ( uint32_t  portin)
inline

Port constructor.

◆ Locator_t() [5/5]

Locator_t ( int32_t  kindin,
uint32_t  portin 
)
inline

Kind and port constructor.

Member Function Documentation

◆ create_locator()

static Locator_t create_locator ( int32_t  kind,
const std::string &  address,
uint32_t  port 
)
static

Create a locator with the given parameters.

Parameters
kindKind of the locator.
addressIP Address of the locator as string.
portPort of the locator.
Returns
Locator_t object initialized with the given parameters.

◆ get_address() [1/2]

octet* get_address ( )
inline

Getter for the locator IP address.

Returns
IP address as octet pointer.

◆ get_address() [2/2]

octet get_address ( uint16_t  field) const
inline

Getter for a specific field of the locator IP address.

Parameters
fieldIP address element to be accessed.
Returns
Octet value for the specific IP address element.

◆ operator=()

Locator_t& operator= ( const Locator_t loc)
inline

Copy assignment.

◆ set_address()

bool set_address ( const Locator_t other)
inline

Set the locator IP address using another locator.

Parameters
otherLocator which IP address is used to set this locator IP address.
Returns
always true.

◆ set_Invalid_Address()

void set_Invalid_Address ( )
inline

Automatic setter for setting locator IP address to invalid address (0).

Member Data Documentation

◆ address

octet address[16]

IP address.

◆ kind

int32_t kind

Specifies the locator type.

Valid values are:

LOCATOR_KIND_UDPv4

LOCATOR_KIND_UDPv6

LOCATOR_KIND_TCPv4

LOCATOR_KIND_TCPv6

LOCATOR_KIND_SHM

LOCATOR_KIND_ETHERNET

◆ port

uint32_t port

Network port.


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