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>
impl<S, const Y: usize> NetworkUsers<S, Y>
Sourcepub fn new(
stack: NetworkStack,
phy: EthernetPhy,
clock: SystemTimer,
app: &str,
net_settings: &NetSettings,
metadata: &'static ApplicationMetadata,
) -> Self
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
- ASystemTimer
implementingClock
.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.
Sourcepub fn configure_streaming(&mut self, format: impl Into<u8>) -> FrameGenerator
pub fn configure_streaming(&mut self, format: impl Into<u8>) -> FrameGenerator
Sourcepub fn direct_stream(&mut self, remote: StreamTarget)
pub fn direct_stream(&mut self, remote: StreamTarget)
Direct the stream to the provided remote target.
§Args
remote
- The destination for the streamed data.
Sourcepub fn update(&mut self, settings: &mut S) -> NetworkState
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, M> ForwardCompat<T, M> for T
impl<T, M> ForwardCompat<T, M> for T
§impl<T> ReverseCompat<T> for T
impl<T> ReverseCompat<T> for T
§fn reverse(self) -> Reverse<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>>
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)