public bool openDevice() { bool opened = true; CastInfoEvent("Open called in Trionic7", ActivityType.ConvertingFile); MM_BeginPeriod(1); if (canUsbDevice is LPCCANDevice && m_UseFlasherOnDevice) { // connect to adapter LPCCANDevice lpc = (LPCCANDevice)canUsbDevice; if (lpc.connect()) { // get flasher object flash = lpc.createFlasher(); logger.Debug("T7CombiFlasher object created"); CastInfoEvent("CombiAdapter ready", ActivityType.ConvertingFile); } else { opened = false; } } else { if (kwpHandler.openDevice()) { CastInfoEvent("Canbus channel opened", ActivityType.ConvertingFile); if (kwpHandler.startSession()) { CastInfoEvent("Session started", ActivityType.ConvertingFile); } else { CastInfoEvent("Unable to start session. Wait for previous session to timeout (10 seconds) and try again!", ActivityType.ConvertingFile); kwpHandler.closeDevice(); opened = false; } } else { CastInfoEvent("Unable to open canbus channel", ActivityType.ConvertingFile); kwpHandler.closeDevice(); opened = false; } } if (!opened) { CastInfoEvent("Open failed in Trionic7", ActivityType.ConvertingFile); if (canUsbDevice != null) { canUsbDevice.close(); } MM_EndPeriod(1); } return(opened); }
public EducationalBodiesController(ApplicationDbContext context, IFlasher f, IHostingEnvironment ihostingEnvironment) { _context = context; _ihostingEnvironment = ihostingEnvironment; _f = f; }
public UsersController(ApplicationDbContext context, IFlasher f, IMapper mapper, UserManager <AppUser> userManager) { _context = context; _mapper = mapper; _userManager = userManager; _f = f; }
public CartController(IFlasher flasher, IHttpContextAccessor httpContextAccessor, ApplicationDbContext dbContext, UserManager <User> userManager) { _flasher = flasher; _httpContextAccessor = httpContextAccessor; _dbContext = dbContext; _userManager = userManager; }
private void setFlasher() { KWPHandler.setKWPDevice(kwpDevice); kwpHandler = KWPHandler.getInstance(); T7Flasher.setKWPHandler(kwpHandler); flash = new T7Flasher(); flash.onStatusChanged += flash_onStatusChanged; }
public CabinetController(ApplicationDbContext db, UserManager <User> userManager, IFlasher flasher, TeamSpeakQueryClient teamspeakQueryClient, ILogger <CabinetController> logger, IMapper mapper) { _db = db; _userManager = userManager; _flasher = flasher; _teamspeakQueryClient = teamspeakQueryClient; _logger = logger; _mapper = mapper; }
/// <summary> /// Cleans up connections and resources /// </summary> override public void Cleanup() { try { MM_EndPeriod(1); logger.Debug("Cleanup called in Trionic7"); if (flash != null) { flash.onStatusChanged -= flash_onStatusChanged; flash.stopFlasher(); flash.cleanup(); flash = null; } if (kwpHandler != null) { kwpHandler.EnableLog = false; kwpHandler.closeDevice(); } if (canUsbDevice != null) { if (canUsbDevice is LPCCANDevice) { LPCCANDevice lpc = (LPCCANDevice)canUsbDevice; lpc.disconnect(); canUsbDevice.close(); canUsbDevice = null; logger.Debug("Closed LPCCANDevice in Trionic7"); } else { canUsbDevice.close(); canUsbDevice = null; } } } catch (Exception e) { logger.Debug(e.Message); } LogManager.Flush(); }
public TsserverBelongsToCurrentUserFilter(ApplicationDbContext db, UserManager <User> userManager, IFlasher flasher) { this.db = db; this.userManager = userManager; this.flasher = flasher; }
public SchedulingTripHeadsController(ApplicationDbContext context, IFlasher f) { _context = context; _f = f; }
public static void Secondary(this IFlasher flasher, string message, bool dismissable = false) { flasher.Flash(Types.Secondary, message, dismissable); }
public static void Dark(this IFlasher flasher, string message, bool dismissable = false) { flasher.Flash(Types.Dark, message, dismissable); }
public static void Light(this IFlasher flasher, string message, bool dismissable = false) { flasher.Flash(Types.Light, message, dismissable); }
public HomeController(IFlasher f) { this.f = f; }
public RegisterController(ApplicationDbContext db, IFlasher flasher) { _db = db; _flasher = flasher; }
public PatientController(ApplicationDbContext db, IFlasher flasher) { _db = db; _flasher = flasher; }
public HomeController(IFlasher flasher, ILogger <HomeController> logger) { _flasher = flasher; _logger = logger; }
public static void Success(this IFlasher flasher, string message, bool dismissable = false) { flasher.Flash(Types.Success, message, dismissable); }
public static void Warning(this IFlasher flasher, string message, bool dismissable = false) { flasher.Flash(Types.Warning, message, dismissable); }
public CitiesController(ApplicationDbContext context, IFlasher f) { _context = context; _f = f; }
public ProductController(ApplicationDbContext dbContext, IFlasher flasher) { _dbContext = dbContext; _flasher = flasher; }