first commit -push
This commit is contained in:
19
RobotNet.RobotShares/OpenACS/OpenACSPublishSettingDto.cs
Normal file
19
RobotNet.RobotShares/OpenACS/OpenACSPublishSettingDto.cs
Normal 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);
|
||||
7
RobotNet.RobotShares/OpenACS/OpenACSSettingsDto.cs
Normal file
7
RobotNet.RobotShares/OpenACS/OpenACSSettingsDto.cs
Normal 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);
|
||||
}
|
||||
17
RobotNet.RobotShares/OpenACS/OpenACSTrafficSettingDto.cs
Normal file
17
RobotNet.RobotShares/OpenACS/OpenACSTrafficSettingDto.cs
Normal 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);
|
||||
7
RobotNet.RobotShares/OpenACS/RobotACSLockedDto.cs
Normal file
7
RobotNet.RobotShares/OpenACS/RobotACSLockedDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace RobotNet.RobotShares.OpenACS;
|
||||
|
||||
public class RobotACSLockedDto
|
||||
{
|
||||
public string RobotId { get; set; } = "";
|
||||
public string[] ZoneIds { get; set; } = [];
|
||||
}
|
||||
8
RobotNet.RobotShares/OpenACS/TrafficACSRequestModel.cs
Normal file
8
RobotNet.RobotShares/OpenACS/TrafficACSRequestModel.cs
Normal 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;
|
||||
}
|
||||
20
RobotNet.RobotShares/OpenACS/TrafficRequestType.cs
Normal file
20
RobotNet.RobotShares/OpenACS/TrafficRequestType.cs
Normal 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()
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user