Struct NetworkUsers

Source
pub struct NetworkUsers<S, const Y: usize>{
    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>

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 data streaming.

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

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

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
§

impl<T, M> ForwardCompat<T, M> for T

§

fn forward(self) -> Forward<T, M>

Create an e-h-c forward compatibility wrapper around and e-h object Available methods depend on the wrapped type
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.

§

impl<T> ReverseCompat<T> for T

§

fn reverse(self) -> Reverse<T>

Create an e-h-c wrapper around and e-h object Available methods depend on the wrapped type

§

fn reverse_cell(self) -> Reverse<RefCell<T>>

Create an e-h-c reverse compatibility wrapper using a ref-cell for interior mutability (required for InputPin types)

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.