示例#1
0
            protected internal override string DecodeResponse()
            {
                byte [] responseData = SlaveToMasterPacketInfo.Data;
                if (responseData == null)
                {
                    return(Utils.Fcns.CheckedFormat("Cmd{0}: DecodeResponse failed: response data missing or insufficient size", (byte)MasterToSlavePacketInfo.CommandCode));
                }

                Message = SlaveToMasterPacketInfo.DecodePackedASCII(0, responseData.Length) ?? string.Empty;

                return(String.Empty);
            }
示例#2
0
            protected internal override string DecodeResponse()
            {
                byte[] responseData = SlaveToMasterPacketInfo.Data;
                if (responseData == null || responseData.Length != 21)
                {
                    return(Utils.Fcns.CheckedFormat("Cmd{0}: DecodeResponse failed: response data missing or insufficient size", (byte)MasterToSlavePacketInfo.CommandCode));
                }

                Tag        = SlaveToMasterPacketInfo.DecodePackedASCII(0, 6) ?? string.Empty;
                Descriptor = SlaveToMasterPacketInfo.DecodePackedASCII(6, 12) ?? string.Empty;
                Date       = SlaveToMasterPacketInfo.DecodePackedASCII(18, 3) ?? string.Empty;

                return(String.Empty);
            }