12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- namespace WCS.Core
- {
- public enum PLCType
- {
- 西门子 = 1,
- 三菱 = 2,
- 欧姆龙 = 3,
- }
- public struct PLCInfo
- {
- public string IP;
- public int Port;
- public int Slot;
- public int Rack;
- public PLCType Type;
- }
- public struct DBInfo
- {
- public PLCInfo PLCInfo;
- public ushort No;
- }
- public struct ProtocolInfo
- {
- public DBInfo DBInfo;
- public int Position { get; set; }
- }
- public abstract class DeviceData
- {
- public string Code { get; set; } = "";
- public DateTime Frame { get; set; }
- public string Message { get; set; } = "";
- }
- public abstract class DeviceData<T> : DeviceData
- {
- public T Data { get; private set; }
- protected abstract T Convert<TSource>(TSource source);
- }
- }
|