pub struct PortMapping {
pub port_base: u32,
pub domain_id_gain: u32,
pub participant_id_gain: u32,
pub d0: u32,
pub d1: u32,
pub d2: u32,
pub d3: u32,
}Expand description
The tunable parameters of the port number expressions
(9.6.2.3). Default gives the values required for out-of-the-box
interoperability.
Fields§
§port_base: u32PB, the port base number.
domain_id_gain: u32DG, the domain id gain.
participant_id_gain: u32PG, the participant id gain.
d0: u32d0, offset of the discovery multicast port.
d1: u32d1, offset of the discovery unicast port.
d2: u32d2, offset of the user multicast port.
d3: u32d3, offset of the user unicast port.
Implementations§
Source§impl PortMapping
impl PortMapping
Sourcepub fn discovery_multicast_port(&self, domain_id: u32) -> Option<u16>
pub fn discovery_multicast_port(&self, domain_id: u32) -> Option<u16>
SPDP_WELL_KNOWN_MULTICAST_PORT = PB + DG * domainId + d0
(Table 9.15). None if it does not fit in 16 bits.
Sourcepub fn discovery_unicast_port(
&self,
domain_id: u32,
participant_id: u32,
) -> Option<u16>
pub fn discovery_unicast_port( &self, domain_id: u32, participant_id: u32, ) -> Option<u16>
SPDP_WELL_KNOWN_UNICAST_PORT = PB + DG * domainId + d1 + PG *
participantId (Table 9.15).
Sourcepub fn user_multicast_port(&self, domain_id: u32) -> Option<u16>
pub fn user_multicast_port(&self, domain_id: u32) -> Option<u16>
The default user multicast port, PB + DG * domainId + d2 (Table 9.16).
Trait Implementations§
Source§impl Clone for PortMapping
impl Clone for PortMapping
impl Copy for PortMapping
Source§impl Debug for PortMapping
impl Debug for PortMapping
Source§impl Default for PortMapping
impl Default for PortMapping
impl Eq for PortMapping
Source§impl Hash for PortMapping
impl Hash for PortMapping
Source§impl PartialEq for PortMapping
impl PartialEq for PortMapping
impl StructuralPartialEq for PortMapping
Auto Trait Implementations§
impl Forget for PortMapping
impl Freeze for PortMapping
impl Move for PortMapping
impl RefUnwindSafe for PortMapping
impl Send for PortMapping
impl Sync for PortMapping
impl Unpin for PortMapping
impl UnsafeUnpin for PortMapping
impl UnwindSafe for PortMapping
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more