| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
Locator_t Class Reference
eProsima Fast DDS API Reference » RTPS » Common Module.

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

`#include <Locator.hpp>`

Inheritance diagram for Locator_t:
[legend]

## Public Member Functions

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

## Public Attributes

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

## 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

## ◆ 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

  field | IP 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

  other | Locator 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

## ◆ port

uint32_t port

Network port.

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

- include/fastdds/rtps/common/Locator.hpp