Table of Contents

Class NetworkInterface

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Information about a network interface

public class NetworkInterface : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
Inheritance
NetworkInterface
Implements
Inherited Members

Constructors

NetworkInterface()

public NetworkInterface()

Properties

ActiveProtocols

List of active protocols

[SbcProperty(false)]
public ObservableCollection<NetworkProtocol> ActiveProtocols { get; }

Property Value

ObservableCollection<NetworkProtocol>

ActualIP

Actual IPv4 address of the network adapter or null if unknown

public string? ActualIP { get; set; }

Property Value

string

ConfiguredIP

Configured IPv4 address of the network adapter or null if unknown

[SbcProperty(false)]
public string? ConfiguredIP { get; set; }

Property Value

string

DnsServer

Configured IPv4 DNS server of the network adapter or null if unknown

[SbcProperty(false)]
public string? DnsServer { get; set; }

Property Value

string

FirmwareVersion

Version of the network interface or null if unknown. This is only reported by ESP-based boards in standalone mode

public string? FirmwareVersion { get; set; }

Property Value

string

Gateway

IPv4 gateway of the network adapter or null if unknown

public string? Gateway { get; set; }

Property Value

string

Mac

Physical address of the network adapter or null if unknown

public string? Mac { get; set; }

Property Value

string

NumReconnects

Number of reconnect attempts or null if unknown. This is only reported by ESP-based boards in standalone mode

public int? NumReconnects { get; set; }

Property Value

int?

RSSI

Received signal strength indicator of the WiFi adapter (only WiFi, in dBm, or null if unknown)

[SbcProperty(true)]
public int? RSSI { get; set; }

Property Value

int?

SSID

SSID of the WiFi network or null if not applicable

[SbcProperty(true)]
public string? SSID { get; set; }

Property Value

string

Speed

Speed of the network interface (in MBit, null if unknown, 0 if not connected)

[SbcProperty(false)]
public int? Speed { get; set; }

Property Value

int?

State

State of this network interface or null if unknown

public NetworkState? State { get; set; }

Property Value

NetworkState?

Subnet

Subnet of the network adapter or null if unknown

public string? Subnet { get; set; }

Property Value

string

Type

Type of this network interface

public NetworkInterfaceType Type { get; set; }

Property Value

NetworkInterfaceType

WifiCountry

WiFi country code if this is a WiFi adapter and if the country code can be determined

[SbcProperty(false)]
public string? WifiCountry { get; set; }

Property Value

string

Remarks

For this setting to be populated in SBC mode it is required to have the DuetPiManagementPlugin running. This is required due to missing Linux permissions of the control server.

Methods

Assign(IStaticModelObject)

Assign the properties from another instance. This is required to update model properties which do not have a setter

public void Assign(IStaticModelObject from)

Parameters

from IStaticModelObject

Other instance

Clone()

Clone this instance

public object Clone()

Returns

object

Cloned instance

Remarks

This method is auto-generated

UpdateFromJson(JsonElement, bool)

Update this instance from a given JSON element

public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)

Parameters

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader, bool)

Update this instance from a given JSON element

public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)

Parameters

reader Utf8JsonReader

Reader to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data