You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace CncSimulator.Config
|
|
{
|
|
/// <summary>模拟器配置</summary>
|
|
public class SimulatorConfig
|
|
{
|
|
[JsonProperty("gatewayPort")]
|
|
public int GatewayPort { get; set; } = 9000;
|
|
|
|
[JsonProperty("addresses")]
|
|
public List<AddressConfig> Addresses { get; set; } = new List<AddressConfig>();
|
|
}
|
|
|
|
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<DeviceConfig> Devices { get; set; } = new List<DeviceConfig>();
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|