Class Relay
- Namespace
- adas_core.Domain.Models.MongoModels
- Assembly
- adas-core.Domain.dll
Represents a relay class that provides functionality for forwarding or passing through data, commands, or notifications between components.
public class Relay
- Inheritance
-
Relay
- Inherited Members
- Extension Methods
Remarks
This class serves as an intermediary mechanism, commonly used to decouple producers and consumers of information.
Properties
Cache
public bool Cache { get; set; }
Property Value
Driver
public string? Driver { get; init; }
Property Value
Id
public ObjectId Id { get; set; }
Property Value
- ObjectId
InUse
public bool InUse { get; }
Property Value
Ip
public string Ip { get; init; }
Property Value
ManualRelayStatus
public RelayEnum.Status? ManualRelayStatus { get; set; }
Property Value
Mode
public RelayEnum.Mode Mode { get; set; }
Property Value
Open
public bool Open { get; set; }
Property Value
Password
public string? Password { get; init; }
Property Value
Port
public int Port { get; init; }
Property Value
RebootDelay
public int? RebootDelay { get; set; }
Property Value
- int?
RefreshTime
public int RefreshTime { get; set; }
Property Value
RelayName
public string? RelayName { get; init; }
Property Value
RelayNumber
public int RelayNumber { get; init; }
Property Value
Status
public RelayEnum.Status Status { get; set; }
Property Value
Total
public int Total { get; init; }
Property Value
Type
public RelayEnum.Type Type { get; set; }
Property Value
Username
public string? Username { get; init; }
Property Value
Methods
Equals(Relay)
Determines whether the current Relay instance is equal to another Relay by comparing all of their properties (Driver, Ip, Port, RelayNumber, RelayName, Total, Username, and Password).
public bool Equals(Relay other)
Parameters
Returns
- bool
trueif all properties of both relays match; otherwise,false.
ToString()
Returns a JSON string representation of the current object, serializing all its public properties via JsonConvert.
public override string ToString()
Returns
- string
A JSON-formatted string that represents the current object.