67 lines
2.6 KiB
C#
67 lines
2.6 KiB
C#
using adas_core.Domain.Enums;
|
|
|
|
namespace adas_core.module.Relays.Models;
|
|
|
|
/// <summary>
|
|
/// Represents the configuration settings for power outlets in a relay system.
|
|
/// This class includes properties to enable or disable power off and reset functionalities,
|
|
/// as well as details about the outlet such as its ID, name, type, and whether to show the power outlet in the user interface.
|
|
/// </summary>
|
|
public class PowerOutletsConfig
|
|
{
|
|
/// <summary>
|
|
/// Indicates whether the power off functionality is enabled for the outlet.
|
|
/// If true, the outlet can be powered off remotely.
|
|
/// If false, the outlet will remain powered on and cannot be turned off remotely.
|
|
/// </summary>
|
|
public bool PowerOffEnabled = false;
|
|
|
|
/// <summary>
|
|
/// Indicates whether the reset functionality is enabled for the outlet.
|
|
/// </summary>
|
|
public bool ResetEnabled = true;
|
|
|
|
/// <summary>
|
|
/// The unique identifier for the power outlet configuration.
|
|
/// This ID is used to distinguish between different outlet configurations within the relay system.
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// The name of the power outlet. This is a user-friendly name that can be displayed in the user interface to identify the outlet.
|
|
/// </summary>
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// The outlet number or identifier that corresponds to the physical outlet in the relay system.
|
|
/// </summary>
|
|
public int Outlet { get; set; }
|
|
|
|
/// <summary>
|
|
/// The type of the outlet, which can be used to specify the kind of device or functionality associated with the outlet.
|
|
/// </summary>
|
|
public string Type { get; set; } = RelayEnum.OutletType.Pdu.ToString();
|
|
|
|
/// <summary>
|
|
/// The type of icon to be displayed for the outlet in the user interface.
|
|
/// This can be used to visually represent the outlet based on its type or functionality.
|
|
/// </summary>
|
|
public string? IconType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Indicates whether the power outlet should be shown in the user interface.
|
|
/// </summary>
|
|
public bool ShowPowerOutlet { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// String representation of the PowerOutletsConfig object, including its ID, name, outlet number, and type.
|
|
/// </summary>
|
|
/// <returns>A string representation of the PowerOutletsConfig object.</returns>
|
|
public override string ToString()
|
|
{
|
|
return "PowerOutletsConfig id" + Id +
|
|
"name=" + Name +
|
|
" outlet=" + Outlet +
|
|
" type=" + Type;
|
|
}
|
|
} |