Table of Contents

Class DriverId

Namespace
DuetAPI.Utility
Assembly
DuetAPI.dll

Class representing a driver identifier

[JsonConverter(typeof(DriverIdJsonConverter))]
public sealed class DriverId : ICloneable
Inheritance
DriverId
Implements
Inherited Members

Constructors

DriverId()

Default constructor of this class

public DriverId()

DriverId(int, int)

Constructor for creating a new instance from a board and a port

public DriverId(int board, int port)

Parameters

board int

Board number

port int

Port number

DriverId(string?)

Constructor for creating a new instance from a string

public DriverId(string? value)

Parameters

value string

String value

Exceptions

ArgumentException

Driver ID could not be parsed

DriverId(uint)

Constructor for creating a new instance from an unsigned integer

public DriverId(uint value)

Parameters

value uint

Unsigned integer

Properties

Board

Board of this driver identifier

public int Board { get; set; }

Property Value

int

Port

Port of this driver identifier

public int Port { get; set; }

Property Value

int

Methods

Clone()

Create a clome of this instance

public object Clone()

Returns

object

Exceptions

NotImplementedException

Equals(object?)

Checks whether this instance is equal to another

public override bool Equals(object? obj)

Parameters

obj object

Other instance

Returns

bool

Whether this and the other instance are equal

GetHashCode()

Compute a hash code for this instance

public override int GetHashCode()

Returns

int

Hash code

ToString()

Convert this instance to a string

public override string ToString()

Returns

string

String representation

Operators

implicit operator string(DriverId)

Convert an instance to a string

public static implicit operator string(DriverId id)

Parameters

id DriverId

Driver ID to convert

Returns

string

implicit operator uint(DriverId)

Convert an instance to an unsigned integer as expected by RepRapFirmware

public static implicit operator uint(DriverId id)

Parameters

id DriverId

Driver ID to convert

Returns

uint