#region OCV Devices.Add(new OCVModel { DeviceNumber = 1, DeviceName = "OCV0", DeviceType = EnumDeviceType.OCV0, DeviceDescription = "OCV0", DevicePLC = new OmronFinsNet("192.168.1.248", 5003), //BindLineModelCodes = new List<string>() { "G0632" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 4, }); Devices.Add(new OCVModel { DeviceNumber = 2, DeviceName = "OCV1", DeviceType = EnumDeviceType.OCV1, DeviceDescription = "OCV1", DevicePLC = new OmronFinsNet("192.168.1.248", 5005), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 11, }); Devices.Add(new OCVModel { DeviceNumber = 3, DeviceName = "OCV2", DeviceType = EnumDeviceType.OCV2, DeviceDescription = "OCV2", DevicePLC = new OmronFinsNet("192.168.1.248", 5006), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 15, }); #endregion 麻烦转换成json格式
理解问题#region OCV Devices.Add(new OCVModel { DeviceNumber = 1, DeviceName = "OCV0", DeviceType = EnumDeviceType.OCV0, DeviceDescription = "OCV0", DevicePLC = new OmronFinsNet("192.168.1.248", 5003), //BindLineModelCodes = new List<string>() { "G0632" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 4, }); Devices.Add(new OCVModel { DeviceNumber = 2, DeviceName = "OCV1", DeviceType = EnumDeviceType.OCV1, DeviceDescription = "OCV1", DevicePLC = new OmronFinsNet("192.168.1.248", 5005), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 11, }); Devices.Add(new OCVModel { DeviceNumber = 3, DeviceName = "OCV2", DeviceType = EnumDeviceType.OCV2, DeviceDescription = "OCV2", DevicePLC = new OmronFinsNet("192.168.1.248", 5006), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 15, }); #endregion 麻烦转换成json格式
已完成理解「#region OCV Devices.Add(new OCVModel { DeviceNumber = 1, DeviceName = "OCV0", DeviceType = EnumDeviceType.OCV0, DeviceDescription = "OCV0", DevicePLC = new OmronFinsNet("192.168.1.248", 5003), //BindLineModelCodes = new List<string>() { "G0632" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 4, }); Devices.Add(new OCVModel { DeviceNumber = 2, DeviceName = "OCV1", DeviceType = EnumDeviceType.OCV1, DeviceDescription = "OCV1", DevicePLC = new OmronFinsNet("192.168.1.248", 5005), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 11, }); Devices.Add(new OCVModel { DeviceNumber = 3, DeviceName = "OCV2", DeviceType = EnumDeviceType.OCV2, DeviceDescription = "OCV2", DevicePLC = new OmronFinsNet("192.168.1.248", 5006), //BindLineModelCodes = new List<string>() { "G0520" }, PLC_ProductionNo = "D100", PLC_OperationMode = "D104", PLC_DeviceStatus = "D106", ProcessCode = 15, }); #endregion 麻烦转换成json格式」
展开阅读网页
[
{
"DeviceNumber": 1,
"DeviceName": "OCV0",
"DeviceType": "OCV0",
"DeviceDescription": "OCV0",
"DevicePLC": {
"Address": "192.168.1.248",
"Port": 5003
},
"PLC_ProductionNo": "D100",
"PLC_OperationMode": "D104",
"PLC_DeviceStatus": "D106",
"ProcessCode": 4
},
{
"DeviceNumber": 2,
"DeviceName": "OCV1",
"DeviceType": "OCV1",
"DeviceDescription": "OCV1",
"DevicePLC": {
"Address": "192.168.1.248",
"Port": 5005
},
"PLC_ProductionNo": "D100",
"PLC_OperationMode": "D104",
"PLC_DeviceStatus": "D106",
"ProcessCode": 11
},
{
"DeviceNumber": 3,
"DeviceName": "OCV2",
"DeviceType": "OCV2",
"DeviceDescription": "OCV2",
"DevicePLC": {
"Address": "192.168.1.248",
"Port": 5006
},
"PLC_ProductionNo": "D100",
"PLC_OperationMode": "D104",
"PLC_DeviceStatus": "D106",
"ProcessCode": 15
}
]