Example #1
0
        public override string ToString()
        {
            var length = CalculateLength();

            Length = Convert.ToUInt16(length);

            string tempStr = (string)GenericParser.Build <FrameFormat>(this);

            if (string.IsNullOrWhiteSpace(tempStr))
            {
                return(null);
            }

            var subStr = tempStr.TrimStart(new char[] { SOI }).TrimEnd(new char[] { EOI });

            subStr = subStr.Substring(0, subStr.Length - 2);

            var crc = CalculateCRC(subStr);

            var result = string.Format("{0}{1}{2}{3}", SOI, subStr, crc, EOI);



            return(result);
        }
Example #2
0
        public override string ToString()
        {
            string tempStr = (string)GenericParser.Build <RealtimeDataMap_V82>(this);

            if (string.IsNullOrWhiteSpace(tempStr))
            {
                return(null);
            }

            return(tempStr);
        }