Class DriverId
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
DriverId(string?)
Constructor for creating a new instance from a string
public DriverId(string? value)
Parameters
valuestringString 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
valueuintUnsigned integer
Properties
Board
Board of this driver identifier
public int Board { get; set; }
Property Value
Port
Port of this driver identifier
public int Port { get; set; }
Property Value
Methods
Clone()
Create a clome of this instance
public object Clone()
Returns
Exceptions
Equals(object?)
Checks whether this instance is equal to another
public override bool Equals(object? obj)
Parameters
objobjectOther 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
idDriverIdDriver ID to convert
Returns
implicit operator uint(DriverId)
Convert an instance to an unsigned integer as expected by RepRapFirmware
public static implicit operator uint(DriverId id)
Parameters
idDriverIdDriver ID to convert