public bool ReadNVItem(int item, CommandQueue queue, bool threaded) { string strConsoleOut = "DIAG_NV_READ - Item: " + item.ToString(); Command inCommand = new Command(Qcdm.Cmd.DIAG_NV_READ_F, strConsoleOut); queue.Add(ref inCommand); return(queue.Run(threaded)); }
public bool WriteNVItem(int item, byte[] data, CommandQueue queue, bool threaded) { string strConsoleOut = "DIAG_NV_WRITE - Item: " + item.ToString(); Command inCommand = new Command(Qcdm.Cmd.DIAG_NV_WRITE_F, data, strConsoleOut); queue.Add(ref inCommand); return(queue.Run(threaded)); }
public static void SetConnectionMode(ConnectionMode connMode, CommandQueue queue) { Command command; if (connMode == ConnectionMode.OfflineAnalog) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 0, 0 }, "DIAG_CONTROL_F - Change mode: Offline Analog Mode"); queue.Add(ref command); } else if (connMode == ConnectionMode.OfflineDigital) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 1, 0 }, "DIAG_CONTROL_F - Change mode: Offline Digital Mode"); queue.Add(ref command); } else if (connMode == ConnectionMode.Reset) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 2, 0 }, "DIAG_CONTROL_F - Change mode: Reset"); queue.Add(ref command); } else if (connMode == ConnectionMode.FactoryTestMode) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 3, 0 }, "DIAG_CONTROL_F - Change mode: Offline Factory Test Mode"); queue.Add(ref command); } else if (connMode == ConnectionMode.Online) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 4, 0 }, "DIAG_CONTROL_F - Change mode: Online Mode"); queue.Add(ref command); } else if (connMode == ConnectionMode.LowPower) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 5, 0 }, "DIAG_CONTROL_F - Change mode: Low Power Mode"); queue.Add(ref command); } else if (connMode == ConnectionMode.Power) { command = new Command(Qcdm.Cmd.DIAG_CONTROL_F, new byte[] { 6, 0 }, "DIAG_CONTROL_F - Change mode: Power Off Mode"); queue.Add(ref command); } }