19#ifndef FASTDDS_RTPS_COMMON__PORTPARAMETERS_HPP
20#define FASTDDS_RTPS_COMMON__PORTPARAMETERS_HPP
22#include <fastdds/rtps/common/Types.hpp>
23#include <fastdds/dds/log/Log.hpp>
74 uint32_t domainId)
const
80 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232 "
81 <<
"or portBase is too high.");
82 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232 "
83 <<
"or portBase is too high." << std::endl;
100 uint32_t RTPSParticipantID)
const
106 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232, there are "
107 <<
"too much participants created or portBase is too high.");
108 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232, there are "
109 <<
"too much participants created or portBase is too high." << std::endl;
124 uint32_t domainId)
const
130 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232 "
131 <<
"or portBase is too high.");
132 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232 "
133 <<
"or portBase is too high." << std::endl;
138 return static_cast<uint16_t
>(port);
uint16_t participantIDGain
ParticipantID gain, default value 2.
Definition PortParameters.hpp:148
uint16_t offsetd0
Offset d0, default value 0.
Definition PortParameters.hpp:150
uint16_t domainIDGain
DomainID gain, default value 250.
Definition PortParameters.hpp:146
uint32_t getUnicastPort(uint32_t domainId, uint32_t RTPSParticipantID) const
Get a unicast port based on the domain ID and the participant ID.
Definition PortParameters.hpp:98
uint16_t offsetd3
Offset d3, default value 11.
Definition PortParameters.hpp:156
virtual ~PortParameters()
Definition PortParameters.hpp:50
uint32_t getMulticastPort(uint32_t domainId) const
Get a multicast port based on the domain ID.
Definition PortParameters.hpp:73
uint16_t offsetd2
Offset d2, default value 1.
Definition PortParameters.hpp:154
PortParameters()
Definition PortParameters.hpp:38
uint16_t portBase
PortBase, default value 7400.
Definition PortParameters.hpp:144
uint16_t get_discovery_server_port(uint32_t domainId) const
Get a discovery server port based on the domain ID.
Definition PortParameters.hpp:123
bool operator==(const PortParameters &b) const
Definition PortParameters.hpp:54
uint16_t offsetd4
Offset d4, default value 2.
Definition PortParameters.hpp:158
uint16_t offsetd1
Offset d1, default value 10.
Definition PortParameters.hpp:152
Contains the RTPS protocol implementation.