Esempio n. 1
0
 public static string[] GetAdapterNames(CANBusAdapter adapterType)
 {
     try
     {
         if (adapterType == CANBusAdapter.LAWICEL)
         {
             return(CANUSBDevice.GetAdapterNames());
         }
         else if (adapterType == CANBusAdapter.ELM327)
         {
             return(CANELM327Device.GetAdapterNames());
         }
         else if (adapterType == CANBusAdapter.JUST4TRIONIC)
         {
             return(Just4TrionicDevice.GetAdapterNames());
         }
         else if (adapterType == CANBusAdapter.KVASER)
         {
             return(KvaserCANDevice.GetAdapterNames());
         }
         else if (adapterType == CANBusAdapter.J2534)
         {
             return(J2534CANDevice.GetAdapterNames());
         }
     }
     catch (Exception ex)
     {
         logger.Debug(ex, "Failed to get adapternames");
     }
     return(new string[0]);
 }