rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
@@ -2,18 +2,61 @@ 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 +
@@ -1,8 +1,23 @@
namespace adas_core.module.Relays.Models;
/// <summary>
/// Represents the settings for a relay device, including caching behavior, refresh intervals, and data source URLs.
/// These settings allow for flexible configuration of the relay's operation, enabling it to optimize performance and ensure up-to-date information based on the specified parameters.
/// </summary>
public class RelaySettings
{
/// <summary>
/// Indicates whether the relay should cache the data it retrieves. If true, the relay will store the data locally to improve performance and reduce the number of requests to the source. If false, the relay will fetch fresh data from the source every time it is requested.
/// </summary>
public bool Cache { get; set; }
/// <summary>
/// The time interval, in seconds, at which the relay should refresh its cached data. If null, the relay will use a default refresh interval.
/// </summary>
public int? RefreshTime { get; set; }
/// <summary>
/// The URL from which the relay should retrieve data. This can be an API endpoint or a recording URL. If null, the relay will use a default source.
/// </summary>
public string? RecordingOrApiUrl { get; set; }
}