Table of Contents

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

bool

Driver

public string? Driver { get; init; }

Property Value

string

Id

public ObjectId Id { get; set; }

Property Value

ObjectId

InUse

public bool InUse { get; }

Property Value

bool

Ip

public string Ip { get; init; }

Property Value

string

ManualRelayStatus

public RelayEnum.Status? ManualRelayStatus { get; set; }

Property Value

RelayEnum.Status?

Mode

public RelayEnum.Mode Mode { get; set; }

Property Value

RelayEnum.Mode

Open

public bool Open { get; set; }

Property Value

bool

Password

public string? Password { get; init; }

Property Value

string

Port

public int Port { get; init; }

Property Value

int

RebootDelay

public int? RebootDelay { get; set; }

Property Value

int?

RefreshTime

public int RefreshTime { get; set; }

Property Value

int

RelayName

public string? RelayName { get; init; }

Property Value

string

RelayNumber

public int RelayNumber { get; init; }

Property Value

int

Status

public RelayEnum.Status Status { get; set; }

Property Value

RelayEnum.Status

Total

public int Total { get; init; }

Property Value

int

Type

public RelayEnum.Type Type { get; set; }

Property Value

RelayEnum.Type

Username

public string? Username { get; init; }

Property Value

string

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

other Relay

The other Relay instance to compare against the current one.

Returns

bool

true if 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.