OutstationConfig

Struct OutstationConfig 

Source
pub struct OutstationConfig {
Show 16 fields pub outstation_address: EndpointAddress, pub master_address: EndpointAddress, pub event_buffer_config: EventBufferConfig, pub solicited_buffer_size: BufferSize, pub unsolicited_buffer_size: BufferSize, pub rx_buffer_size: BufferSize, pub decode_level: DecodeLevel, pub confirm_timeout: Timeout, pub select_timeout: Timeout, pub features: Features, pub max_unsolicited_retries: Option<usize>, pub unsolicited_retry_delay: Duration, pub keep_alive_timeout: Option<Duration>, pub max_read_request_headers: Option<u16>, pub max_controls_per_request: Option<u16>, pub class_zero: ClassZeroConfig,
}
Expand description

Outstation configuration parameters

Fields§

§outstation_address: EndpointAddress

address of the outstation

§master_address: EndpointAddress

address of the master with which the outstation will communicate

§event_buffer_config: EventBufferConfig

event buffers configuration

§solicited_buffer_size: BufferSize

buffer size for transmitted solicited responses

§unsolicited_buffer_size: BufferSize

buffer size for transmitted unsolicited responses

§rx_buffer_size: BufferSize

buffer size for received requests, i.e. the transport reassembly buffer

§decode_level: DecodeLevel

initial decoding level

§confirm_timeout: Timeout

confirm timeout for solicited and unsolicited responses

§select_timeout: Timeout

timeout after which a matching OPERATE will fail with SELECT_TIMEOUT

§features: Features

optional features that can be enabled

§max_unsolicited_retries: Option<usize>

number of non-regenerated unsolicited retries to perform

§unsolicited_retry_delay: Duration

amount of time to wait after a failed unsolicited response series before starting another series

§keep_alive_timeout: Option<Duration>

time without any link activity before the outstation will send REQUEST_LINK_STATES

A value of None will disable this feature

§max_read_request_headers: Option<u16>

Maximum number of headers that will be processed in a READ request. Internally, this controls the size of a pre-allocated buffer used to process requests. A minimum value of OutstationConfig::DEFAULT_MAX_READ_REQUEST_HEADERS is always enforced. Requesting more than this number will result in the PARAMETER_ERROR IIN bit being set in the response.

§max_controls_per_request: Option<u16>

Maximum number of controls in a single request

§class_zero: ClassZeroConfig

controls responses to class 0 READ requests

Implementations§

Source§

impl OutstationConfig

Source

pub const DEFAULT_MAX_READ_REQUEST_HEADERS: u16 = 64u16

Default number of object headers supported in a READ request

Source

pub const DEFAULT_CONFIRM_TIMEOUT: Duration

Default confirmation timeout

Source

pub const DEFAULT_SELECT_TIMEOUT: Duration

Default select timeout

Source

pub const DEFAULT_UNSOLICITED_RETRY_DELAY: Duration

Default unsolicited retry delay between series

Source

pub fn new( outstation_address: EndpointAddress, master_address: EndpointAddress, event_buffer_config: EventBufferConfig, ) -> Self

constructs an OutstationConfig with default settings, except for the master and outstation link addresses which really don’t have good defaults

Trait Implementations§

Source§

impl Clone for OutstationConfig

Source§

fn clone(&self) -> OutstationConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OutstationConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for OutstationConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more