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

RaiseNetworkConnected<T>(T)

Raises the Meadow.NetworkAdapterBase.NetworkConnected event

View Source
Declaration
public 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

NetworkConnected

Raised when the device connects to a network.

View Source
Declaration
public event NetworkConnectionHandler NetworkConnected
Event Type

Meadow.Hardware.NetworkConnectionHandler

NetworkDisconnected

Raised when the device disconnects from a network.

View Source
Declaration
public event NetworkDisconnectionHandler NetworkDisconnected
Event Type

Meadow.Hardware.NetworkDisconnectionHandler

NetworkError

Raised when a network error occurs

View Source
Declaration
public event NetworkErrorHandler NetworkError
Event Type

Meadow.Hardware.NetworkErrorHandler

Implements