Struct common_messages_sv2::SetupConnection [−][src]
pub struct SetupConnection<'decoder> { pub protocol: Protocol, pub min_version: u16, pub max_version: u16, pub flags: u32, pub endpoint_host: Str0255<'decoder>, pub endpoint_port: u16, pub vendor: Str0255<'decoder>, pub hardware_version: Str0255<'decoder>, pub firmware: Str0255<'decoder>, pub device_id: Str0255<'decoder>, }
Expand description
SetupConnection (Client -> Server)
Initiates the connection. This MUST be the first message sent by the client on the newly
opened connection. Server MUST respond with either a SetupConnectionSuccess
or
SetupConnectionError
message. Clients that are not configured to provide telemetry data to
the upstream node SHOULD set device_id to 0-length strings. However, they MUST always set
vendor to a string describing the manufacturer/developer and firmware version and SHOULD
always set hardware_version to a string describing, at least, the particular hardware/software
package in use.
Fields
protocol: Protocol
min_version: u16
The minimum protocol version the client supports (currently must be 2).
max_version: u16
The maximum protocol version the client supports (currently must be 2).
flags: u32
Flags indicating optional protocol features the client supports. Each
protocol from [SetupConnection.protocol
] field has its own values/flags.
endpoint_host: Str0255<'decoder>
ASCII text indicating the hostname or IP address.
endpoint_port: u16
Connecting port value
vendor: Str0255<'decoder>
hardware_version: Str0255<'decoder>
firmware: Str0255<'decoder>
device_id: Str0255<'decoder>
Trait Implementations
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
fn from_reader(reader: &mut impl Read) -> Result<Self, Error>
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<'decoder> RefUnwindSafe for SetupConnection<'decoder>
impl<'decoder> Send for SetupConnection<'decoder>
impl<'decoder> Sync for SetupConnection<'decoder>
impl<'decoder> Unpin for SetupConnection<'decoder>
impl<'decoder> !UnwindSafe for SetupConnection<'decoder>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,