You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
55 lines
1.6 KiB
namespace Mirle.Component.MPLC.MCProtocol
|
|
{
|
|
/// <summary>
|
|
/// 設備
|
|
/// </summary>
|
|
public class Device
|
|
{
|
|
/// <summary>
|
|
/// 建構式
|
|
/// </summary>
|
|
/// <param name="dataType">資料類別</param>
|
|
/// <param name="asciiCode">ASCII編碼</param>
|
|
/// <param name="binaryCode">二進位編碼</param>
|
|
/// <param name="addressType">位置類別</param>
|
|
public Device(string dataType, string asciiCode, byte binaryCode, string addressType)
|
|
{
|
|
DataType = dataType;
|
|
AsciiCode = asciiCode;
|
|
BinaryCode = binaryCode;
|
|
AddressType = addressType;
|
|
}
|
|
/// <summary>
|
|
/// 位元類別
|
|
/// </summary>
|
|
public const string TypeBit = "BIT";
|
|
/// <summary>
|
|
/// 字元類別
|
|
/// </summary>
|
|
public const string TypeWord = "WORD";
|
|
/// <summary>
|
|
/// 十六進位位置
|
|
/// </summary>
|
|
public const string AddressHexadecimal = "HEX";
|
|
/// <summary>
|
|
/// 十進位位置
|
|
/// </summary>
|
|
public const string AddressDecimal = "DEC";
|
|
/// <summary>
|
|
/// 資料類別
|
|
/// </summary>
|
|
public string DataType { get; }
|
|
/// <summary>
|
|
/// ASCII編碼
|
|
/// </summary>
|
|
public string AsciiCode { get; }
|
|
/// <summary>
|
|
/// 二進位編碼
|
|
/// </summary>
|
|
public byte BinaryCode { get; }
|
|
/// <summary>
|
|
/// 位置類別
|
|
/// </summary>
|
|
public string AddressType { get; }
|
|
}
|
|
}
|