Esempio n. 1
0
        public void TestConvertStringToSubsystemCode()
        {
            // Create a serial number
            string       serialStr = "01200000000000000000000000000001";
            SerialNumber serialNum = new SerialNumber(serialStr);

            byte subsystemCode = Subsystem.ConvertSubsystemCode(serialNum.SubsystemsString(), 0);

            Assert.AreEqual(50, subsystemCode, "Subsystem Code value is incorrect.");
            Assert.AreEqual(Subsystem.SUB_1_2MHZ_4BEAM_20DEG_PISTON_2, subsystemCode, "Subsystem Code is incorrect.");
        }
Esempio n. 2
0
        public void TestConvertStringToSubsystemCode()
        {
            // Create a serial number
            string serialStr = "01200000000000000000000000000001";
            SerialNumber serialNum = new SerialNumber(serialStr);

            byte subsystemCode = Subsystem.ConvertSubsystemCode(serialNum.SubsystemsString(), 0);

            Assert.AreEqual(50, subsystemCode, "Subsystem Code value is incorrect.");
            Assert.AreEqual(Subsystem.SUB_1_2MHZ_4BEAM_20DEG_PISTON_2, subsystemCode, "Subsystem Code is incorrect.");
        }
Esempio n. 3
0
 /// <summary>
 /// Initialize values.
 /// </summary>
 public AdcpConfiguration(SerialNumber serial)
 {
     // Initialize values
     SubsystemConfigDict = new Dictionary <string, AdcpSubsystemConfig>();
     Commands            = new AdcpCommands();
     _serialNumber       = serial;
     SetCepo(_serialNumber.SubsystemsString(), _serialNumber);       // Must go after Commands is created
     DeploymentOptions    = new DeploymentOptions();
     AdcpSerialOptions    = new AdcpSerialPort.AdcpSerialOptions();
     IsGps1SerialEnabled  = false;
     IsGps2SerialEnabled  = false;
     IsNmea1SerialEnabled = false;
     IsNmea2SerialEnabled = false;
     Gps1SerialOptions    = new SerialOptions();
     Gps2SerialOptions    = new SerialOptions();
     Nmea1SerialOptions   = new SerialOptions();
     Nmea2SerialOptions   = new SerialOptions();
     HardwareOptions      = new EngConf();
     EthernetOptions      = new AdcpEthernetOptions();
     VesselMountOptions   = new VesselMountOptions();
     EngPort            = "";
     AdditionalCommands = "";
 }
Esempio n. 4
0
 /// <summary>
 /// Initialize values.
 /// </summary>
 public AdcpConfiguration(SerialNumber serial)
 {
     // Initialize values
     SubsystemConfigDict = new Dictionary<string, AdcpSubsystemConfig>();
     Commands = new AdcpCommands();
     _serialNumber = serial;
     SetCepo(_serialNumber.SubsystemsString(), _serialNumber);       // Must go after Commands is created
     DeploymentOptions = new DeploymentOptions();
     AdcpSerialOptions = new AdcpSerialPort.AdcpSerialOptions();
     Gps1SerialOptions = new SerialOptions();
     Gps2SerialOptions = new SerialOptions();
     Nmea1SerialOptions = new SerialOptions();
     Nmea2SerialOptions = new SerialOptions();
     HardwareOptions = new EngConf();
     EthernetOptions = new AdcpEthernetOptions();
     VesselMountOptions = new VesselMountOptions();
 }