Skip to main content

Class NetworkAdapterBase

A base class for INetworkAdapter implementations

Assembly: Meadow.dll
View Source
Declaration
public abstract class NetworkAdapterBase : INetworkAdapter

Derived:
Meadow.Devices.WiFiNetworkAdapter

Implements:
Meadow.Hardware.INetworkAdapter

Properties

IsConnected

returns the connection state of the NetworkAdapter

View Source
Declaration
public abstract bool IsConnected { get; }

MacAddress

Gets the physical (MAC) address of the network adapter

View Source
Declaration
public virtual PhysicalAddress MacAddress { get; }

InterfaceType

Gets the network interface type

View Source
Declaration
public NetworkInterfaceType InterfaceType { get; }

Name

Gets the friendly name of the Adapter

View Source
Declaration
public virtual string Name { get; }

IpAddress

IP Address of the network adapter.

View Source
Declaration
public IPAddress IpAddress { get; }

DnsAddresses

DNS Addresses of the network adapter.

View Source
Declaration
public IPAddressCollection DnsAddresses { get; }

SubnetMask

Subnet mask of the adapter.

View Source
Declaration
public IPAddress SubnetMask { get; }

Gateway

Default gateway for the adapter.

View Source
Declaration
public IPAddress Gateway { get; }

Methods

RaiseNetworkConnecting()

Raises the Meadow.NetworkAdapterBase.NetworkConnecting event

View Source
Declaration
protected void RaiseNetworkConnecting()

RaiseConnectFailed()

Raises the Meadow.NetworkAdapterBase.NetworkConnectFailed event

View Source
Declaration
protected void RaiseConnectFailed()

RaiseNetworkConnected<T>(T)

Raises the Meadow.NetworkAdapterBase.NetworkConnected event

View Source
Declaration
protected void RaiseNetworkConnected<T>(T args) where T : NetworkConnectionEventArgs
Parameters
TypeName
<T>args
Type Parameters
  • T

RaiseNetworkDisconnected(NetworkDisconnectionEventArgs)

Raises the Meadow.NetworkAdapterBase.NetworkDisconnected event

View Source
Declaration
protected void RaiseNetworkDisconnected(NetworkDisconnectionEventArgs args)
Parameters
TypeName
Meadow.Hardware.NetworkDisconnectionEventArgsargs

RaiseNetworkError(NetworkErrorEventArgs)

Raises the Meadow.NetworkAdapterBase.NetworkError event

View Source
Declaration
protected void RaiseNetworkError(NetworkErrorEventArgs args)
Parameters
TypeName
Meadow.Hardware.NetworkErrorEventArgsargs

Refresh()

Refreshes the NetworkAdapter's information

View Source
Declaration
protected void Refresh()

Events

NetworkConnecting

Event raised when a network is connecting

View Source
Declaration
public event NetworkStateHandler? NetworkConnecting
Event Type

Meadow.Hardware.NetworkStateHandler

NetworkConnected

Event raised when a network is connected

View Source
Declaration
public event NetworkConnectionHandler? NetworkConnected
Event Type

Meadow.Hardware.NetworkConnectionHandler

NetworkDisconnected

Event raised when a network is disconnected

View Source
Declaration
public event NetworkDisconnectionHandler? NetworkDisconnected
Event Type

Meadow.Hardware.NetworkDisconnectionHandler

NetworkConnectFailed

Event raised when a auto-reconnecting to a network has terminaled

View Source
Declaration
public event NetworkStateHandler? NetworkConnectFailed
Event Type

Meadow.Hardware.NetworkStateHandler

NetworkError

Raised when a network error occurs

View Source
Declaration
public event NetworkErrorHandler NetworkError
Event Type

Meadow.Hardware.NetworkErrorHandler

Implements