Struct ads::AmsNetId [] [src]

pub struct AmsNetId(pub [u8; 6]);

Represents an AMS NetID.

The NetID consists of 6 bytes commonly written like an IPv4 address, i.e. 1.2.3.4.5.6. Together with an AMS port (16-bit integer), it uniquely identifies an endpoint of an ADS system that can be communicated with.

Although often the first 4 bytes of a NetID look like an IP address, and sometimes even are identical to the device's IP address, there is no requirement for this, and one should never rely on it.

Methods

impl AmsNetId
[src]

[src]

Create a NetID from six bytes.

[src]

Create a NetID from a slice (which must have length 6).

[src]

Check if the NetID is all-zero.

Trait Implementations

impl Clone for AmsNetId
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for AmsNetId
[src]

impl PartialEq for AmsNetId
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for AmsNetId
[src]

impl PartialOrd for AmsNetId
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for AmsNetId
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Default for AmsNetId
[src]

[src]

Returns the "default value" for a type. Read more

impl FromStr for AmsNetId
[src]

The associated error which can be returned from parsing.

[src]

Parse a NetID from a string (a.b.c.d.e.f).

Bytes can be missing in the end; missing bytes are substituted by 1.

impl Display for AmsNetId
[src]

[src]

Format a NetID in the usual format.

Auto Trait Implementations

impl Send for AmsNetId

impl Sync for AmsNetId