| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
LocatorWithMask Class Reference

A Locator with a mask that defines the number of significant bits of its address. More...

`#include <LocatorWithMask.hpp>`

Inheritance diagram for LocatorWithMask:
[legend]

## Public Member Functions

uint8_t | mask () const
| Get the number of significant bits on the address of this locator.
void | mask (uint8_t mask)
| Set the number of significant bits on the address of this locator.
bool | matches (const Locator &loc) const
| Check whether the given locator is from the same network as this locator.
LocatorWithMask & | operator= (const Locator &loc)
| Copy assignment.
Public Member Functions inherited from Locator_t
| 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).

## Additional Inherited Members

Public Attributes inherited from Locator_t
int32_t | kind
| Specifies the locator type.
uint32_t | port
| Network port.
octet | address [16]
| IP address.

## Detailed Description

A Locator with a mask that defines the number of significant bits of its address.

## Member Function Documentation

## ◆ mask() [1/2]

uint8_t mask | ( |  | ) | const

Get the number of significant bits on the address of this locator.

Returns
  number of significant bits on the address of this locator.

## ◆ mask() [2/2]

void mask | ( | uint8_t | mask | ) |

Set the number of significant bits on the address of this locator.

Parameters

  mask | number of significant bits on the address of this locator.

## ◆ matches()

bool matches | ( | const Locator & | loc | ) | const

Check whether the given locator is from the same network as this locator.

Parameters

  loc | locator to check if belonging to the same network as this locator.

Returns
  true if the two locators are from the same network, false otherwise.

## ◆ operator=()

LocatorWithMask & operator= | ( | const Locator & | loc | ) |

Copy assignment.

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

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