using System.Collections.Generic;
using Newtonsoft.Json;
namespace CncSimulator.Config
{
/// 模拟器配置
public class SimulatorConfig
{
[JsonProperty("gatewayPort")]
public int GatewayPort { get; set; } = 9000;
[JsonProperty("addresses")]
public List Addresses { get; set; } = new List();
}
public class AddressConfig
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("port")]
public int Port { get; set; }
[JsonProperty("brand")]
public string Brand { get; set; } = "fanuc";
[JsonProperty("dataChangeInterval")]
public int DataChangeInterval { get; set; } = 10;
[JsonProperty("scenarioMode")]
public string ScenarioMode { get; set; } = "auto";
[JsonProperty("devices")]
public List Devices { get; set; } = new List();
}
public class DeviceConfig
{
[JsonProperty("deviceCode")]
public string DeviceCode { get; set; }
[JsonProperty("desc")]
public string Desc { get; set; }
[JsonProperty("initialProgram")]
public string InitialProgram { get; set; } = "O0001";
[JsonProperty("initialPartCount")]
public int InitialPartCount { get; set; } = 0;
}
}