Struct modbus_server::ModbusConfig[][src]

pub struct ModbusConfig {
    pub tcp_port: u16,
    pub tcp_connect_timeout: Option<Duration>,
    pub tcp_read_timeout: Option<Duration>,
    pub tcp_write_timeout: Option<Duration>,
    pub modbus_uid: u8,
}
Expand description

Config structure for more control over the tcp socket settings

Fields

tcp_port: u16

The TCP port to use for communication (Default: 502)

tcp_connect_timeout: Option<Duration>

Connection timeout for TCP socket (Default: OS Default)

tcp_read_timeout: Option<Duration>

Timeout when reading from the TCP socket (Default: infinite)

tcp_write_timeout: Option<Duration>

Timeout when writing to the TCP socket (Default: infinite)

modbus_uid: u8

The modbus Unit Identifier used in the modbus layer (Default: 1)

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

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.