/// <summary> /// Get the CEPO command from the string. /// Then pass each value to the serial number generator as /// a subsystem. /// </summary> /// <param name="line">Line containing the CEPO command.</param> private void PassCepoToSerialNumberGen(string line) { // Seperate CEPO command string[] tokens = line.Split(new string[] { Commands.AdcpCommands.CMD_CEPO }, StringSplitOptions.None); if (tokens.Length > 1) { // Get the list of subsystems from the CEPO command string subsystems = tokens[1]; // Create a subsystem and pass it to Serial number generator for (ushort x = 0; x < subsystems.Length; x++) { Subsystem ss = new Subsystem(Convert.ToByte(subsystems[x]), x); SerialNumberGeneratorVM.AddSubsystem(ss); } } }
/// <summary> /// Scan the ADCP for its configuration. /// </summary> private void ExecuteScanAdcp() { if (_pm.IsProjectSelected) { // Get the ADCP configuration _pm.SelectedProject = _adcpConnection.SetAdcpConfiguration(_pm.SelectedProject); // Set the serial number AdcpSerialNumber = _pm.SelectedProject.SerialNumber.ToString(); AdcpSerialNumber += "\n"; AdcpSerialNumber += _pm.SelectedProject.SerialNumber.GetSerialNumberDescString(true); // Set the serial number to the generator SerialNumberGeneratorVM.UpdateSerialNumber(_pm.SelectedProject.SerialNumber); // Turn off the flag IsScanning = false; } }