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>
73 uint32_t domainId)
const
79 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232 "
80 <<
"or portBase is too high.");
81 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232 "
82 <<
"or portBase is too high." << std::endl;
99 uint32_t RTPSParticipantID)
const
105 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232, there are "
106 <<
"too much participants created or portBase is too high.");
107 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232, there are "
108 <<
"too much participants created or portBase is too high." << std::endl;
123 uint32_t domainId)
const
129 EPROSIMA_LOG_ERROR(RTPS,
"Calculated port number is too high. Probably the domainId is over 232 "
130 <<
"or portBase is too high.");
131 std::cout <<
"Calculated port number is too high. Probably the domainId is over 232 "
132 <<
"or portBase is too high." << std::endl;
137 return static_cast<uint16_t
>(port);
Class PortParameters, to define the port parameters and gains related with the RTPS protocol.
Definition PortParameters.hpp:34
uint16_t participantIDGain
ParticipantID gain, default value 2.
Definition PortParameters.hpp:147
uint16_t offsetd0
Offset d0, default value 0.
Definition PortParameters.hpp:149
uint16_t domainIDGain
DomainID gain, default value 250.
Definition PortParameters.hpp:145
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:97
uint16_t offsetd3
Offset d3, default value 11.
Definition PortParameters.hpp:155
virtual ~PortParameters()
Definition PortParameters.hpp:49
uint32_t getMulticastPort(uint32_t domainId) const
Get a multicast port based on the domain ID.
Definition PortParameters.hpp:72
uint16_t offsetd2
Offset d2, default value 1.
Definition PortParameters.hpp:153
PortParameters()
Definition PortParameters.hpp:37
uint16_t portBase
PortBase, default value 7400.
Definition PortParameters.hpp:143
uint16_t get_discovery_server_port(uint32_t domainId) const
Get a discovery server port based on the domain ID.
Definition PortParameters.hpp:122
bool operator==(const PortParameters &b) const
Definition PortParameters.hpp:53
uint16_t offsetd4
Offset d4, default value 2.
Definition PortParameters.hpp:157
uint16_t offsetd1
Offset d1, default value 10.
Definition PortParameters.hpp:151