first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSPublishSettingDto
{
public string PublishUrl { get; set; } = "";
public string[] PublishUrlsUsed { get; set; } = [];
public bool IsPublishEnabled { get; set; }
public int PublishInterval { get; set; }
public OpenACSPublishSettingDto() { }
public OpenACSPublishSettingDto(bool enable, string url, string[] urlsUsed, int interval)
{
IsPublishEnabled = enable;
PublishUrl = url;
PublishUrlsUsed = urlsUsed;
PublishInterval = interval;
}
}
public record class OpenACSPublishSettingModel(string Url, int Interval);

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSSettingsDto
{
public OpenACSTrafficSettingDto TrafficSetting { get; set; } = new(false, "", []);
public OpenACSPublishSettingDto PublishSetting { get; set; } = new(false, "", [], 2000);
}

View File

@@ -0,0 +1,17 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSTrafficSettingDto
{
public string TrafficUrl { get; set; } = "";
public string[] PublishUrlsUsed { get; set; } = [];
public bool IsTrafficEnabled { get; set; }
public OpenACSTrafficSettingDto() { }
public OpenACSTrafficSettingDto(bool enable, string url, string[] urlsUsed)
{
IsTrafficEnabled = enable;
TrafficUrl = url;
PublishUrlsUsed = urlsUsed;
}
}
public record class OpenACSTrafficSettingModel(string Url);

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.OpenACS;
public class RobotACSLockedDto
{
public string RobotId { get; set; } = "";
public string[] ZoneIds { get; set; } = [];
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.OpenACS;
public class TrafficACSRequestModel
{
public string RobotId { get; set; } = "";
public string ZoneId { get; set; } = "";
public TrafficRequestType Type { get; set; } = TrafficRequestType.OUT;
}

View File

@@ -0,0 +1,20 @@
namespace RobotNet.RobotShares.OpenACS;
public enum TrafficRequestType
{
IN,
OUT,
}
public static class EnumExtensions
{
public static string ToInOutString(this TrafficRequestType type)
{
return type switch
{
TrafficRequestType.IN => "in",
TrafficRequestType.OUT => "out",
_ => type.ToString()
};
}
}