Class NetworkAdapterBase
A base class for INetworkAdapter implementations
Assembly: Meadow.dll
View Source
public abstract class NetworkAdapterBase : INetworkAdapter
Derived:
Meadow.Devices.WiFiNetworkAdapter
Implements:
Meadow.Hardware.INetworkAdapter
Properties
IsConnected
returns the connection state of the NetworkAdapter
View Source
public abstract bool IsConnected { get; }
MacAddress
Gets the physical (MAC) address of the network adapter
View Source
public virtual PhysicalAddress MacAddress { get; }
InterfaceType
Gets the network interface type
View Source
public NetworkInterfaceType InterfaceType { get; }
Name
Gets the friendly name of the Adapter
View Source
public virtual string Name { get; }
IpAddress
IP Address of the network adapter.
View Source
public IPAddress IpAddress { get; }
DnsAddresses
DNS Addresses of the network adapter.
View Source
public IPAddressCollection DnsAddresses { get; }
SubnetMask
Subnet mask of the adapter.
View Source
public IPAddress SubnetMask { get; }
Gateway
Default gateway for the adapter.
View Source
public IPAddress Gateway { get; }
Methods
RaiseNetworkConnected<T>(T)
Raises the Meadow.NetworkAdapterBase.NetworkConnected event
View Source
public void RaiseNetworkConnected<T>(T args) where T : NetworkConnectionEventArgs
Parameters
Type | Name |
---|---|
<T> | args |
Type Parameters
T
RaiseNetworkDisconnected(NetworkDisconnectionEventArgs)
Raises the Meadow.NetworkAdapterBase.NetworkDisconnected event
View Source
protected void RaiseNetworkDisconnected(NetworkDisconnectionEventArgs args)
Parameters
Type | Name |
---|---|
Meadow.Hardware.NetworkDisconnectionEventArgs | args |
RaiseNetworkError(NetworkErrorEventArgs)
Raises the Meadow.NetworkAdapterBase.NetworkError event
View Source
protected void RaiseNetworkError(NetworkErrorEventArgs args)
Parameters
Type | Name |
---|---|
Meadow.Hardware.NetworkErrorEventArgs | args |
Refresh()
Refreshes the NetworkAdapter's information
View Source
protected void Refresh()
Events
NetworkConnected
Raised when the device connects to a network.
View Source
public event NetworkConnectionHandler NetworkConnected
Event Type
Meadow.Hardware.NetworkConnectionHandler
NetworkDisconnected
Raised when the device disconnects from a network.
View Source
public event NetworkDisconnectionHandler NetworkDisconnected
Event Type
Meadow.Hardware.NetworkDisconnectionHandler
NetworkError
Raised when a network error occurs
View Source
public event NetworkErrorHandler NetworkError
Event Type
Meadow.Hardware.NetworkErrorHandler