Exemplo n.º 1
0
        private async Task <List <ObdPid> > getReportedPids(ObdPid rangePid)
        {
            if (!rangePid.ToString().Contains("PidSupport"))
            {
                throw new ArgumentOutOfRangeException("Not a valid Pid Support OBDPid");
            }

            var reported = (await Run(rangePid)).Value as Dictionary <ObdPid, bool>;

            if (reported == null)
            {
                return(new List <ObdPid>());
            }
            else
            {
                return(reported.Keys.Where(k => reported[k]).ToList());
            }
        }
Exemplo n.º 2
0
        private async Task<List<ObdPid>> getReportedPids(ObdPid rangePid)
        {
            if (!rangePid.ToString().Contains("PidSupport"))
                throw new ArgumentOutOfRangeException("Not a valid Pid Support OBDPid");

            var reported = (await Run(rangePid)).Value as Dictionary<ObdPid, bool>;

            if (reported == null)
                return new List<ObdPid>();
            else
                return reported.Keys.Where(k => reported[k]).ToList();
        }
Exemplo n.º 3
0
 public static string GetName(this ObdPid pid)
 {
     return(string.Format("PID {0}", pid.ToString().Replace("Pid", "")));
 }