Struct stabilizer::net::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>
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: SocketAddr)
pub fn direct_stream(&mut self, remote: SocketAddr)
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