44 lines
794 B
C#
44 lines
794 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SamplePre.Communication
|
|
{
|
|
|
|
/// <summary>
|
|
/// 通讯协议类型枚举
|
|
/// </summary>
|
|
public enum CommProtocolType
|
|
{
|
|
S7 = 0,
|
|
ModbusTcp = 1,
|
|
ModbusRtu = 2
|
|
}
|
|
|
|
/// <summary>
|
|
/// 通讯状态枚举
|
|
/// </summary>
|
|
public enum CommunicationState
|
|
{
|
|
Disconnected = 0,
|
|
Connected = 1,
|
|
Connecting = 2,
|
|
Error = 3
|
|
}
|
|
|
|
/// <summary>
|
|
/// 通讯数据类型枚举
|
|
/// </summary>
|
|
public enum CommDataType
|
|
{
|
|
Bit, // 位
|
|
Byte, // 字节
|
|
Int16, // 16位整数
|
|
Int32, // 32位整数
|
|
Float // 浮点型
|
|
}
|
|
|
|
}
|