示例#1
0
        private bool SendAndRecCustom(string txString, out string ctl, out string result)//有返回数据
        {
            result = null;
            ctl    = null;

            string ret = SendAndRec(txString);

            if (ret != null)
            {
                _retFrm = new Frame645(ret);
                if (!_retFrm.IsValidFrame)
                {
                    return(false);
                }
                ctl    = _retFrm.CtrolNum;
                result = _retFrm.OriginalData;
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
 /// <summary>
 /// 分析报文
 /// </summary>
 /// <param name="frm"></param>
 protected override void AnayzeFrm(string frm)
 {
     _retFrm = null;
     _retFrm = new Frame645(frm);
 }
示例#3
0
        /// <summary>
        /// 判断是否读完
        /// </summary>
        /// <param name="frm">输入帧</param>
        /// <returns></returns>
        protected override bool ReceiveFinishJudge(byte[] frm)
        {
            Frame645 frm645 = new Frame645(frm);

            return(frm645.IsValidFrame);
        }