pub struct SocketAddress(/* private fields */);
Expand description
A socket address establishes the link between one or more ECUs and a NetworkEndpoint
.
It contains all settings that are relevant for this combination.
Implementations§
Source§impl SocketAddress
impl SocketAddress
Sourcepub fn network_endpoint(&self) -> Option<NetworkEndpoint>
pub fn network_endpoint(&self) -> Option<NetworkEndpoint>
get the network endpoint of this SocketAddress
Sourcepub fn socket_address_type(&self) -> Option<SocketAddressType>
pub fn socket_address_type(&self) -> Option<SocketAddressType>
get the socket address type: unicast / multicast, as well as the connected ecus
Sourcepub fn add_multicast_ecu(
&self,
ecu: &EcuInstance,
) -> Result<(), AutosarAbstractionError>
pub fn add_multicast_ecu( &self, ecu: &EcuInstance, ) -> Result<(), AutosarAbstractionError>
add an EcuInstance
to this multicast SocketAddress
Sourcepub fn set_unicast_ecu(
&self,
ecu: &EcuInstance,
) -> Result<(), AutosarAbstractionError>
pub fn set_unicast_ecu( &self, ecu: &EcuInstance, ) -> Result<(), AutosarAbstractionError>
set the EcuInstance
for this unicast SocketAddress
Sourcepub fn tp_config(&self) -> Option<TpConfig>
pub fn tp_config(&self) -> Option<TpConfig>
get the transport protocol settings for this SocketAddress
Sourcepub fn create_static_socket_connection(
&self,
name: &str,
remote_address: &SocketAddress,
tcp_role: Option<TcpRole>,
tcp_connect_timeout: Option<f64>,
) -> Result<StaticSocketConnection, AutosarAbstractionError>
pub fn create_static_socket_connection( &self, name: &str, remote_address: &SocketAddress, tcp_role: Option<TcpRole>, tcp_connect_timeout: Option<f64>, ) -> Result<StaticSocketConnection, AutosarAbstractionError>
create a new StaticSocketConnection
from this SocketAddress
to a remote SocketAddress
Sourcepub fn physical_channel(
&self,
) -> Result<EthernetPhysicalChannel, AutosarAbstractionError>
pub fn physical_channel( &self, ) -> Result<EthernetPhysicalChannel, AutosarAbstractionError>
get the PhysicalChannel
containing this SocketAddress
Sourcepub fn static_socket_connections(
&self,
) -> impl Iterator<Item = StaticSocketConnection> + Send + 'static
pub fn static_socket_connections( &self, ) -> impl Iterator<Item = StaticSocketConnection> + Send + 'static
iterate over all StaticSocketConnection
s in this SocketAddress
Sourcepub fn create_provided_service_instance(
&self,
name: &str,
service_identifier: u16,
instance_identifier: u16,
) -> Result<ProvidedServiceInstanceV1, AutosarAbstractionError>
pub fn create_provided_service_instance( &self, name: &str, service_identifier: u16, instance_identifier: u16, ) -> Result<ProvidedServiceInstanceV1, AutosarAbstractionError>
create a ProvidedServiceInstanceV1
in this SocketAddress
Creating a ProvidedServiceInstanceV1
in a SocketAddress
is part of the old way of defining services (<= Autosar 4.5.0).
It is obsolete in newer versions of the standard.
When using the new way of defining services, a ProvidedServiceInstance
should be created in a ServiceInstanceCollectionSet
instead.
Sourcepub fn provided_service_instances(
&self,
) -> impl Iterator<Item = ProvidedServiceInstanceV1> + Send + 'static
pub fn provided_service_instances( &self, ) -> impl Iterator<Item = ProvidedServiceInstanceV1> + Send + 'static
get the ProvidedServiceInstanceV1
s in this SocketAddress
Sourcepub fn create_consumed_service_instance(
&self,
name: &str,
provided_service_instance: &ProvidedServiceInstanceV1,
) -> Result<ConsumedServiceInstanceV1, AutosarAbstractionError>
pub fn create_consumed_service_instance( &self, name: &str, provided_service_instance: &ProvidedServiceInstanceV1, ) -> Result<ConsumedServiceInstanceV1, AutosarAbstractionError>
create a ConsumedServiceInstanceV1
in this SocketAddress
Creating a ConsumedServiceInstanceV1
in a SocketAddress
is part of the old way of defining services (<= Autosar 4.5.0).
It is obsolete in newer versions of the standard.
When using the new way of defining services, a ConsumedServiceInstance
should be created in a ServiceInstanceCollectionSet
instead.
Sourcepub fn consumed_service_instances(
&self,
) -> impl Iterator<Item = ConsumedServiceInstanceV1> + Send + 'static
pub fn consumed_service_instances( &self, ) -> impl Iterator<Item = ConsumedServiceInstanceV1> + Send + 'static
get the ConsumedServiceInstance
s in this SocketAddress
Trait Implementations§
Source§impl AbstractionElement for SocketAddress
impl AbstractionElement for SocketAddress
Source§impl Clone for SocketAddress
impl Clone for SocketAddress
Source§fn clone(&self) -> SocketAddress
fn clone(&self) -> SocketAddress
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SocketAddress
impl Debug for SocketAddress
Source§impl From<SocketAddress> for Element
impl From<SocketAddress> for Element
Source§fn from(val: SocketAddress) -> Self
fn from(val: SocketAddress) -> Self
Source§impl Hash for SocketAddress
impl Hash for SocketAddress
Source§impl PartialEq for SocketAddress
impl PartialEq for SocketAddress
Source§impl TryFrom<Element> for SocketAddress
impl TryFrom<Element> for SocketAddress
impl Eq for SocketAddress
impl StructuralPartialEq for SocketAddress
Auto Trait Implementations§
impl Freeze for SocketAddress
impl !RefUnwindSafe for SocketAddress
impl Send for SocketAddress
impl Sync for SocketAddress
impl Unpin for SocketAddress
impl !UnwindSafe for SocketAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.