예제 #1
0
        static void ProcessParameterSupport(SupportResponse r)
        {
            var supportedPIDs = Support.GetSupportedPIDs(r.SupportValue, r.PID, IncludeSupportPIDs);

            foreach (var pid in supportedPIDs)
            {
                SearchAddParameter(pid);
            }
        }
예제 #2
0
        SupportResponse ParseLine(string line)
        {
            var r = new SupportResponse();

            var bytes = ParseHexBytes(line, separators);

            r.PID          = (UInt16)ParseUIntBigEndian(bytes, 1, 2);
            r.SupportValue = (UInt32)ParseUIntBigEndian(bytes, 3, 4);

            return(r);
        }
예제 #3
0
        public bool Parse(out List <SupportResponse> list)
        {
            list = new List <SupportResponse> (64);

            string line;

            while ((line = sr.ReadLine()) != null)
            {
                if (line.StartsWith(Comment) || string.IsNullOrEmpty(line))
                {
                    continue;
                }
                try {
                    SupportResponse p = ParseLine(line);
                    list.Add(p);
                } catch (Exception ex) {
                    throw new InvalidDataException("Error parsing line:\n" + line, ex);
                }
            }

            return(true);
        }
        SupportResponse ParseLine(string line)
        {
            var r = new SupportResponse ();

            var bytes = ParseHexBytes (line, separators);

            r.PID = (UInt16)ParseUIntBigEndian (bytes, 1, 2);
            r.SupportValue = (UInt32)ParseUIntBigEndian (bytes, 3, 4);

            return r;
        }
예제 #5
0
 static void ProcessParameterSupport(SupportResponse r)
 {
     var supportedPIDs = Support.GetSupportedPIDs (r.SupportValue, r.PID, IncludeSupportPIDs);
     foreach (var pid in supportedPIDs) {
         SearchAddParameter (pid);
     }
 }