Table of Contents

Class Network

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Information about the network subsystem

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

Constructors

Network()

public Network()

Fields

DefaultHostname

Fallback hostname if the Name is invalid

public const string DefaultHostname = "duet"

Field Value

string

DefaultName

Default name of the machine

public const string DefaultName = "My Duet"

Field Value

string

DefaultPassword

Default network password of the machine

public const string DefaultPassword = "reprap"

Field Value

string

Properties

CorsSite

If this is set, the web server will allow cross-origin requests via the Access-Control-Allow-Origin header

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

Property Value

string

Hostname

Hostname of the machine

public string Hostname { get; set; }

Property Value

string

Interfaces

List of available network interfaces

[SbcProperty(true)]
public StaticModelCollection<NetworkInterface> Interfaces { get; }

Property Value

StaticModelCollection<NetworkInterface>
See Also

Name

Name of the machine

public string Name { get; set; }

Property Value

string

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