Exemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="iUnPackage">拆包接口定义实现</param>
 /// <param name="startFlag">起始位</param>
 /// <param name="endflag">结束位</param>
 /// <param name="protocolMaxFullCount">报文最大长度</param>
 /// <param name="protocolMinCount">协议最小长度</param>
 /// 时间:2017/1/9 22:41
 /// 备注:
 public UnPackageData(IUnPackageProtocol iUnPackage, byte startFlag, byte endflag, int protocolMaxFullCount, int protocolMinCount)
 {
     ValidateOperator.Begin().NotNull(iUnPackage, "适用于串口,Socket数据协议接口");
     StartFlag            = startFlag;
     EndFlag              = endflag;
     ProtocolMaxFullCount = protocolMaxFullCount;
     unPackageProtocol    = iUnPackage;
     ProtocolMinCount     = protocolMinCount;
 }
 //86
 //2E 00
 //01 02 03 04 05 06 07 08
 //86
 //90 02 00 00 02 F1 12 70 89 57 54 46 23 12 67 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 20 17 01 09 10 02 06 05 00 01 74 00 43 01 01 00
 //30 4D
 //16
 public CtmUnPackageData(IUnPackageProtocol iUnPackage) : base(iUnPackage, 0x86, 0x16, 65535, 15)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="iUnPackage">拆包接口</param>
 /// <param name="protocolMinCount">协议最小长度</param>
 /// 时间:2017/1/9 22:42
 /// 备注:
 public UnPackageData(IUnPackageProtocol iUnPackage, int protocolMinCount) : this(iUnPackage, 0x68, 0x16, 65535, protocolMinCount)
 {
 }