pub struct NetworkUsers<S, const Y: usize>
where for<'de> S: Default + JsonCoreSlash<'de, Y> + Clone,
{ pub miniconf: MqttClient<'static, S, NetworkReference, SystemTimer, NamedBroker<NetworkReference>, Y>, pub processor: NetworkProcessor, pub telemetry: TelemetryClient, /* private fields */ }
Expand description

A structure of Stabilizer’s default network users.

Fields§

§miniconf: MqttClient<'static, S, NetworkReference, SystemTimer, NamedBroker<NetworkReference>, Y>§processor: NetworkProcessor§telemetry: TelemetryClient

Implementations§

source§

impl<S, const Y: usize> NetworkUsers<S, Y>
where for<'de> S: Default + JsonCoreSlash<'de, Y> + Clone,

source

pub fn new( stack: NetworkStack, phy: EthernetPhy, clock: SystemTimer, app: &str, net_settings: &NetSettings, metadata: &'static ApplicationMetadata ) -> Self

Construct Stabilizer’s default network users.

§Args
  • stack - The network stack that will be used to share with all network users.
  • phy - The ethernet PHY connecting the network.
  • clock - A SystemTimer implementing Clock.
  • app - The name of the application.
  • net_settings - The network-specific settings to use for the application.
  • metadata - The application metadata
§Returns

A new struct of network users.

source

pub fn configure_streaming(&mut self, format: impl Into<u8>) -> FrameGenerator

Enable live data streaming.

§Args
  • format - A unique u8 code indicating the format of the data.
source

pub fn direct_stream(&mut self, remote: SocketAddr)

Direct the stream to the provided remote target.

§Args
  • remote - The destination for the streamed data.
source

pub fn update(&mut self, settings: &mut S) -> NetworkState

Update and process all of the network users state.

§Returns

An indication if any of the network users indicated a state change. The SettingsChanged option contains the path of the settings that changed.

Auto Trait Implementations§

§

impl<S, const Y: usize> Freeze for NetworkUsers<S, Y>

§

impl<S, const Y: usize> !RefUnwindSafe for NetworkUsers<S, Y>

§

impl<S, const Y: usize> Send for NetworkUsers<S, Y>
where S: Send,

§

impl<S, const Y: usize> !Sync for NetworkUsers<S, Y>

§

impl<S, const Y: usize> Unpin for NetworkUsers<S, Y>
where S: Unpin,

§

impl<S, const Y: usize> !UnwindSafe for NetworkUsers<S, Y>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.