Beispiel #1
0
        public void TestDefaultConstructor()
        {
            DeploymentOptions options = new DeploymentOptions();

            Assert.AreEqual(DeploymentOptions.DEFAULT_BATTERY_TYPE, options.BatteryType, "Battery Type is incorrect.");
            Assert.AreEqual(DeploymentOptions.DEFAULT_DEPTH_TO_BOTTOM, options.DepthToBottom, "Depth to Bottom is incorrect.");
            Assert.AreEqual(DeploymentOptions.DEFAULT_DURATION, options.Duration, "Duration is incorrect.");
            Assert.AreEqual(DeploymentOptions.DEFAULT_NUM_BATTERIES, options.NumBatteries, "Number of Batteries is incorrect.");
        }
Beispiel #2
0
        public void TestConstructor()
        {
            DeploymentOptions options = new DeploymentOptions(5, 6, DeploymentOptions.AdcpBatteryType.Lithium_7DD, 77, DeploymentOptions.AdcpDeploymentMode.DirectReading, 22, 33);

            Assert.AreEqual(5, options.Duration, "Duration is incorrect.");
            Assert.AreEqual(6, options.NumBatteries, "Number of Batteries is incorrect.");
            Assert.AreEqual(DeploymentOptions.AdcpBatteryType.Lithium_7DD, options.BatteryType, "Battery Type is incorrect.");
            Assert.AreEqual(77, options.DepthToBottom, "Depth to Bottom is incorrect.");
            Assert.AreEqual(DeploymentOptions.AdcpDeploymentMode.DirectReading, options.DeploymentMode, "Deployment mode is incorrect");
            Assert.AreEqual(22, options.InternalMemoryCardUsed, "Used Internal memory is incorrect.");
            Assert.AreEqual(33, options.InternalMemoryCardTotalSize, "Internal Memory total size is incorrect.");
        }
Beispiel #3
0
        public void TestSetting()
        {
            DeploymentOptions options = new DeploymentOptions();
            options.Duration = 5;
            options.NumBatteries = 6;
            options.BatteryType = DeploymentOptions.AdcpBatteryType.Lithium_7DD;
            options.DepthToBottom = 77;

            Assert.AreEqual(5, options.Duration, "Duration is incorrect.");
            Assert.AreEqual(6, options.NumBatteries, "Number of Batteries is incorrect.");
            Assert.AreEqual(DeploymentOptions.AdcpBatteryType.Lithium_7DD, options.BatteryType, "Battery Type is incorrect.");
            Assert.AreEqual(77, options.DepthToBottom, "Depth to Bottom is incorrect.");
        }
Beispiel #4
0
        public void TestSetDeploymentOptions()
        {
            AdcpConfiguration config = new AdcpConfiguration();

            DeploymentOptions options = new DeploymentOptions();
            options.DepthToBottom = 2345;
            config.DeploymentOptions = options;

            Assert.AreEqual(2345, config.DeploymentOptions.DepthToBottom, "DeploymentOptions Depth To bottom is incorrect.");
        }
Beispiel #5
0
 /// <summary>
 /// Initialize values.
 /// </summary>
 public AdcpConfiguration()
 {
     // Initialize values
     SubsystemConfigDict = new Dictionary<string, AdcpSubsystemConfig>();
     Commands = new AdcpCommands();
     _serialNumber = new SerialNumber();
     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();
 }
Beispiel #6
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();
 }