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: Protocolmin_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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.