Example #1
0
        public void TestCWPAPMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 10,0.15,0.06,0.04,0.01
            Assert.AreEqual(10, resultConfig2_1.Commands.CWPAP_NumPingsAvg, "CWPAP 2_1 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.15, resultConfig2_1.Commands.CWPAP_Lag, 0.0001, "CWPAP 2_1 Lag is incorrect.");
            Assert.AreEqual(0.06, resultConfig2_1.Commands.CWPAP_Blank, 0.0001, "CWPAP 2_1 Blank is incorrect.");
            Assert.AreEqual(0.04, resultConfig2_1.Commands.CWPAP_BinSize, 0.0001, "CWPAP 2_1 Bin Size is incorrect.");
            Assert.AreEqual(0.01, resultConfig2_1.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 2_1 Time Between Pings is incorrect.");

            // [1] 11,0.16,0.07,0.05,0.02
            Assert.AreEqual(11, resultConfig2_2.Commands.CWPAP_NumPingsAvg, "CWPAP 2_2 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.16, resultConfig2_2.Commands.CWPAP_Lag, 0.0001, "CWPAP 2_2 Lag is incorrect.");
            Assert.AreEqual(0.07, resultConfig2_2.Commands.CWPAP_Blank, 0.0001, "CWPAP 2_2 Blank is incorrect.");
            Assert.AreEqual(0.05, resultConfig2_2.Commands.CWPAP_BinSize, 0.0001, "CWPAP 2_2 Bin Size is incorrect.");
            Assert.AreEqual(0.02, resultConfig2_2.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 2_2 Time Between Pings is incorrect.");

            // [3] 13,0.18,0.09,0.07,0.04
            Assert.AreEqual(13, resultConfig2_3.Commands.CWPAP_NumPingsAvg, "CWPAP 2_3 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.18, resultConfig2_3.Commands.CWPAP_Lag, 0.0001, "CWPAP 2_3 Lag is incorrect.");
            Assert.AreEqual(0.09, resultConfig2_3.Commands.CWPAP_Blank, 0.0001, "CWPAP 2_3 Blank is incorrect.");
            Assert.AreEqual(0.07, resultConfig2_3.Commands.CWPAP_BinSize, 0.0001, "CWPAP 2_3 Bin Size is incorrect.");
            Assert.AreEqual(0.04, resultConfig2_3.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 2_3 Time Between Pings is incorrect.");

            // [6] 16,0.21,0.12,0.10,0.07
            Assert.AreEqual(16, resultConfig2_4.Commands.CWPAP_NumPingsAvg, "CWPAP 2_4 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.21, resultConfig2_4.Commands.CWPAP_Lag, 0.0001, "CWPAP 2_4 Lag is incorrect.");
            Assert.AreEqual(0.12, resultConfig2_4.Commands.CWPAP_Blank, 0.0001, "CWPAP 2_4 Blank is incorrect.");
            Assert.AreEqual(0.10, resultConfig2_4.Commands.CWPAP_BinSize, 0.0001, "CWPAP 2_4 Bin Size is incorrect.");
            Assert.AreEqual(0.07, resultConfig2_4.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 2_4 Time Between Pings is incorrect.");

            // [2] 12,0.17,0.08,0.06,0.03
            Assert.AreEqual(12, resultConfig3_1.Commands.CWPAP_NumPingsAvg, "CWPAP 3_1 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.17, resultConfig3_1.Commands.CWPAP_Lag, 0.0001, "CWPAP 3_1 Lag is incorrect.");
            Assert.AreEqual(0.08, resultConfig3_1.Commands.CWPAP_Blank, 0.0001, "CWPAP 3_1 Blank is incorrect.");
            Assert.AreEqual(0.06, resultConfig3_1.Commands.CWPAP_BinSize, 0.0001, "CWPAP 3_1 Bin Size is incorrect.");
            Assert.AreEqual(0.03, resultConfig3_1.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 3_1 Time Between Pings is incorrect.");

            // [4] 14,0.19,0.10,0.08,0.05
            Assert.AreEqual(14, resultConfig3_2.Commands.CWPAP_NumPingsAvg, "CWPAP 3_2 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.19, resultConfig3_2.Commands.CWPAP_Lag, 0.0001, "CWPAP 3_2 Lag is incorrect.");
            Assert.AreEqual(0.10, resultConfig3_2.Commands.CWPAP_Blank, 0.0001, "CWPAP 3_2 Blank is incorrect.");
            Assert.AreEqual(0.08, resultConfig3_2.Commands.CWPAP_BinSize, 0.0001, "CWPAP 3_2 Bin Size is incorrect.");
            Assert.AreEqual(0.05, resultConfig3_2.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 3_2 Time Between Pings is incorrect.");

            // [5] 15,0.20,0.11,0.09,0.06
            Assert.AreEqual(15, resultConfig3_3.Commands.CWPAP_NumPingsAvg, "CWPAP 3_3 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.20, resultConfig3_3.Commands.CWPAP_Lag, 0.0001, "CWPAP 3_3 Lag is incorrect.");
            Assert.AreEqual(0.11, resultConfig3_3.Commands.CWPAP_Blank, 0.0001, "CWPAP 3_3 Blank is incorrect.");
            Assert.AreEqual(0.09, resultConfig3_3.Commands.CWPAP_BinSize, 0.0001, "CWPAP 3_3 Bin Size is incorrect.");
            Assert.AreEqual(0.06, resultConfig3_3.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 3_3 Time Between Pings is incorrect.");
        }
Example #2
0
        public void TestCBTBBMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 0, 1.001, 30.00
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.NARROWBAND_LONG_RANGE, resultConfig2_1.Commands.CBTBB_Mode, "CBTBB_Mode 2_1 is incorrect.");
            Assert.AreEqual(1.001, resultConfig2_1.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 2_1 is incorrect");
            Assert.AreEqual(30.00, resultConfig2_1.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 2_1 is incorrect.");

            // [1] 1, 2.002, 30.02
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_CODED, resultConfig2_2.Commands.CBTBB_Mode, "CBTBB_Mode 2_2 is incorrect.");
            Assert.AreEqual(2.002, resultConfig2_2.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 2_2 is incorrect");
            Assert.AreEqual(30.02, resultConfig2_2.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 2_2 is incorrect.");

            // [3] 4, 4.004, 30.04
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_NON_CODED_P2P, resultConfig2_3.Commands.CBTBB_Mode, "CBTBB_Mode 2_3 is incorrect.");
            Assert.AreEqual(4.004, resultConfig2_3.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 2_3 is incorrect");
            Assert.AreEqual(30.04, resultConfig2_3.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 2_3 is incorrect.");

            // [6] 7, 7.007, 30.07
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.AUTO_SWITCH_NARROWBAND_BB_NONCODED_BB_NONCODED_P2P, resultConfig2_4.Commands.CBTBB_Mode, "CBTBB_Mode 2_4 is incorrect.");
            Assert.AreEqual(7.007, resultConfig2_4.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 2_4 is incorrect");
            Assert.AreEqual(30.07, resultConfig2_4.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 2_4 is incorrect.");

            // [2] 3, 3.003, 50.03
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.NA_3, resultConfig3_1.Commands.CBTBB_Mode, "CBTBB_Mode 3_1 is incorrect.");
            Assert.AreEqual(3.003, resultConfig3_1.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 3_1 is incorrect");
            Assert.AreEqual(50.03, resultConfig3_1.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 3_1 is incorrect.");

            // [4] 5, 5.005, 50.05
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.NA_5, resultConfig3_2.Commands.CBTBB_Mode, "CBTBB_Mode 3_2 is incorrect.");
            Assert.AreEqual(5.005, resultConfig3_2.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 3_2 is incorrect");
            Assert.AreEqual(50.05, resultConfig3_2.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 3_2 is incorrect.");

            // [5] 6, 6.006, 50.06
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.NA_6, resultConfig3_3.Commands.CBTBB_Mode, "CBTBB_Mode 3_3 is incorrect.");
            Assert.AreEqual(6.006, resultConfig3_3.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 3_3 is incorrect");
            Assert.AreEqual(50.06, resultConfig3_3.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 3_3 is incorrect.");
        }
Example #3
0
        public void TestCBTMX11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(75.00, ssConfig.Commands.CBTMX, 0.0001, "CBTMX is incorrect");
        }
Example #4
0
        public void TestCWTONMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            Assert.AreEqual(true, resultConfig2_1.Commands.CWTON, "CWTON 2_1 is not correct");
            Assert.AreEqual(false, resultConfig2_2.Commands.CWTON, "CWTON 2_2 is not correct");
            Assert.AreEqual(false, resultConfig2_3.Commands.CWTON, "CWTON 2_3 is not correct");
            Assert.AreEqual(false, resultConfig2_4.Commands.CWTON, "CWTON 2_4 is not correct");

            Assert.AreEqual(true, resultConfig3_1.Commands.CWTON, "CWTON 3_1 is not correct");
            Assert.AreEqual(false, resultConfig3_2.Commands.CWTON, "CWTON 3_2 is not correct");
            Assert.AreEqual(true, resultConfig3_3.Commands.CWTON, "CWTON 3_3 is not correct");
        }
Example #5
0
        public void TestCBTBB11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_NON_CODED, ssConfig.Commands.CBTBB_Mode, "CBTBB_Mode is incorrect.");
            Assert.AreEqual(1.023, ssConfig.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag is incorrect");
            Assert.AreEqual(30.00, ssConfig.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth is incorrect.");
        }
Example #6
0
        public void TestCWT11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            Assert.AreEqual(15.00f, config.Commands.CWT, 0.0001, "CWT is incorrect");
        }
Example #7
0
        public void TestCBIMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 00:00:01.01,101
            Assert.AreEqual(new TimeValue(00, 00, 01, 01), resultConfig2_1.Commands.CBI_BurstInterval, "CBI_BurstInterval 2_1 is incorrect");
            Assert.AreEqual(101, resultConfig2_1.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 2_1 is incorrect.");
            // [1] 00:00:01.02,102
            Assert.AreEqual(new TimeValue(00, 00, 01, 02), resultConfig2_2.Commands.CBI_BurstInterval, "CBI_BurstInterval 2_2 is incorrect");
            Assert.AreEqual(102, resultConfig2_2.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 2_2 is incorrect.");
            // [3] 00:00:01.03,103
            Assert.AreEqual(new TimeValue(00, 00, 01, 03), resultConfig2_3.Commands.CBI_BurstInterval, "CBI_BurstInterval 2_3 is incorrect");
            Assert.AreEqual(103, resultConfig2_3.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 2_3 is incorrect.");
            // [6] 00:06:03.01,106
            Assert.AreEqual(new TimeValue(00, 06, 03, 01), resultConfig2_4.Commands.CBI_BurstInterval, "CBI_BurstInterval 2_4 is incorrect");
            Assert.AreEqual(106, resultConfig2_4.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 2_4 is incorrect.");

            // [2] 00:02:03.01,102
            Assert.AreEqual(new TimeValue(00, 02, 03, 01), resultConfig3_1.Commands.CBI_BurstInterval, "CBI_BurstInterval 3_1 is incorrect");
            Assert.AreEqual(102, resultConfig3_1.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 3_1 is incorrect.");
            // [4] 00:00:03.04,104
            Assert.AreEqual(new TimeValue(00, 00, 03, 04), resultConfig3_2.Commands.CBI_BurstInterval, "CBI_BurstInterval 3_2 is incorrect");
            Assert.AreEqual(104, resultConfig3_2.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 3_2 is incorrect.");
            // [5] 00:00:01.05,105
            Assert.AreEqual(new TimeValue(00, 00, 01, 05), resultConfig3_3.Commands.CBI_BurstInterval, "CBI_BurstInterval 3_3 is incorrect");
            Assert.AreEqual(105, resultConfig3_3.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 3_3 is incorrect.");
        }
Example #8
0
        public void TestCWPBP1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            Assert.AreEqual(1, resultConfig1.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 1 is incorrect");
            Assert.AreEqual(0.02, resultConfig1.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 1 is incorrect");

            Assert.AreEqual(2, resultConfig2.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 2 is incorrect");
            Assert.AreEqual(0.04, resultConfig2.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 2 is incorrect");

            Assert.AreEqual(3, resultConfig3.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 3 is incorrect");
            Assert.AreEqual(0.05, resultConfig3.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 3 is incorrect");
        }
Example #9
0
        public void TestCWPBPMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 1,0.02
            Assert.AreEqual(1, resultConfig2_1.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 2_1 is incorrect");
            Assert.AreEqual(0.02, resultConfig2_1.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 2_1 is incorrect");
            // [1] 2,0.03
            Assert.AreEqual(2, resultConfig2_2.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 2_2 is incorrect");
            Assert.AreEqual(0.03, resultConfig2_2.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 2_2 is incorrect");
            // [3] 4,0.05
            Assert.AreEqual(4, resultConfig2_3.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 2_3 is incorrect");
            Assert.AreEqual(0.05, resultConfig2_3.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 2_3 is incorrect");
            // [6] 7,0.08
            Assert.AreEqual(7, resultConfig2_4.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 2_4 is incorrect");
            Assert.AreEqual(0.08, resultConfig2_4.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 2_4 is incorrect");

            // [2] 3,0.04
            Assert.AreEqual(3, resultConfig3_1.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 3_1 is incorrect");
            Assert.AreEqual(0.04, resultConfig3_1.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 3_1 is incorrect");
            // [4] 5,0.06
            Assert.AreEqual(5, resultConfig3_2.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 3_2 is incorrect");
            Assert.AreEqual(0.06, resultConfig3_2.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 3_2 is incorrect");
            // [5] 6,0.07
            Assert.AreEqual(6, resultConfig3_3.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg 3_3 is incorrect");
            Assert.AreEqual(0.07, resultConfig3_3.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings 3_3 is incorrect");
        }
Example #10
0
        public void TestC232B1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            Assert.AreEqual(Baudrate.BAUD_4800, config.Commands.C232B, "C232B is incorrect");
        }
Example #11
0
        public void TestCWPBP11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(1, ssConfig.Commands.CWPBP_NumPingsAvg, "CWPBP_NumPingsAvg is incorrect");
            Assert.AreEqual(0.02, ssConfig.Commands.CWPBP_TimeBetweenBasePings, 0.0001, "CWPBP_TimeBetweenBasePings is incorrect");
        }
Example #12
0
        public void TestCWPBBMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            Assert.AreEqual(0.042, resultConfig2_1.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 2_1 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND, resultConfig2_1.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 2_1 is incorrect.");

            Assert.AreEqual(0.042, resultConfig2_2.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 2_2 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.NONCODED_PULSE_TO_PULSE, resultConfig2_2.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 2_2 is incorrect.");

            Assert.AreEqual(0.044, resultConfig2_3.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 2_3 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.NONCODED_PULSE_TO_PULSE, resultConfig2_3.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 2_3 is incorrect.");

            Assert.AreEqual(0.043, resultConfig2_4.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 2_4 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND_PULSE_TO_PULSE, resultConfig2_4.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 2_4 is incorrect.");

            Assert.AreEqual(0.084, resultConfig3_1.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 3_1 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND_PULSE_TO_PULSE, resultConfig3_1.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 3_1 is incorrect.");

            Assert.AreEqual(0.084, resultConfig3_2.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 3_2 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND, resultConfig3_2.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 3_2 is incorrect.");

            Assert.AreEqual(0.085, resultConfig3_3.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 3_3 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND, resultConfig3_3.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 3_3 is incorrect.");
        }
Example #13
0
        public void TestCWPBB1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            Assert.AreEqual(0.042, resultConfig1.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 1 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND, resultConfig1.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 1 is incorrect.");

            Assert.AreEqual(0.043, resultConfig2.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 2 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.NONCODED_PULSE_TO_PULSE, resultConfig2.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 2 is incorrect.");

            Assert.AreEqual(0.044, resultConfig3.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength 3 is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND_PULSE_TO_PULSE, resultConfig3.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type 3 is incorrect.");
        }
Example #14
0
        public void TestCWPBB11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(0.042, ssConfig.Commands.CWPBB_LagLength, 0.0001, "CWPBB LagLength is incorrect");
            Assert.AreEqual(RTI.Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND, ssConfig.Commands.CWPBB_TransmitPulseType, "CWPBB Transmit Pulse Type is incorrect.");
        }
Example #15
0
        public void TestCBI1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            Assert.AreEqual(new TimeValue(00, 00, 01, 01), resultConfig1.Commands.CBI_BurstInterval, "CBI_BurstInterval 1 is incorrect");
            Assert.AreEqual(101, resultConfig1.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 1 is incorrect.");

            Assert.AreEqual(new TimeValue(00, 00, 01, 02), resultConfig2.Commands.CBI_BurstInterval, "CBI_BurstInterval 2 is incorrect");
            Assert.AreEqual(102, resultConfig2.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 2 is incorrect.");

            Assert.AreEqual(new TimeValue(00, 00, 03, 01), resultConfig3.Commands.CBI_BurstInterval, "CBI_BurstInterval 3 is incorrect");
            Assert.AreEqual(103, resultConfig3.Commands.CBI_NumEnsembles, "CBI_NumEnsembles 3 is incorrect.");
        }
Example #16
0
        public void TestC485B11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            Assert.AreEqual(Baudrate.BAUD_460800, config.Commands.C485B, "C485B is incorrect");
        }
Example #17
0
        public void TestCWSS1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            Assert.AreEqual(1500.06, config.Commands.CWSS, 0.0001, "CWSS is incorrect");
        }
Example #18
0
        public void TestCWPPMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 1
            Assert.AreEqual(1, resultConfig2_1.Commands.CWPP, "CWPP 2_1 is incorrect");
            // [1] 2
            Assert.AreEqual(2, resultConfig2_2.Commands.CWPP, "CWPP 2_2 is incorrect");
            // [3] 4
            Assert.AreEqual(4, resultConfig2_3.Commands.CWPP, "CWPP 2_3 is incorrect");
            // [6] 7
            Assert.AreEqual(7, resultConfig2_4.Commands.CWPP, "CWPP 2_4 is incorrect");

            // [2] 3
            Assert.AreEqual(3, resultConfig3_1.Commands.CWPP, "CWPP 3_1 is incorrect");
            // [4] 5
            Assert.AreEqual(5, resultConfig3_2.Commands.CWPP, "CWPP 3_2 is incorrect");
            // [5] 6
            Assert.AreEqual(6, resultConfig3_3.Commands.CWPP, "CWPP 3_3 is incorrect");
        }
Example #19
0
        public void TestCWTBB11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(false, ssConfig.Commands.CWTBB, "CWTON is not correct");
        }
Example #20
0
        public void TestCWPST11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.AreEqual(0.400, ssConfig.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST Correlation Threshold is incorrect");
            Assert.AreEqual(1.000, ssConfig.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.001, ssConfig.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST V Velocity Threshold is incorrect");
        }
Example #21
0
        public void TestCWTMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            Assert.AreEqual(15.033f, config.Commands.CWT, 0.0001, "CWT is incorrect");
        }
Example #22
0
        public void TestCWPST1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            Assert.AreEqual(0.400, resultConfig1.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 1 Correlation Threshold is incorrect");
            Assert.AreEqual(1.000, resultConfig1.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 1 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.001, resultConfig1.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 1 V Velocity Threshold is incorrect");

            Assert.AreEqual(0.500, resultConfig2.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 2 Correlation Threshold is incorrect");
            Assert.AreEqual(1.002, resultConfig2.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 2 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.003, resultConfig2.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 2 V Velocity Threshold is incorrect");

            Assert.AreEqual(0.600, resultConfig3.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 3 Correlation Threshold is incorrect");
            Assert.AreEqual(1.004, resultConfig3.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 3 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.005, resultConfig3.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 3 V Velocity Threshold is incorrect");
        }
Example #23
0
        public void TestModeMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            Assert.AreEqual(RTI.Commands.AdcpCommands.AdcpMode.PROFILE, config.Commands.Mode, "Mode is not correct");
        }
Example #24
0
        public void TestC485BMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            Assert.AreEqual(Baudrate.BAUD_2400, config.Commands.C485B, "C485B is incorrect");
        }
Example #25
0
        public void TestCBTBB1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            // [0] 2, 4.440, 30.00
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_NON_CODED, resultConfig1.Commands.CBTBB_Mode, "CBTBB_Mode 1 is incorrect.");
            Assert.AreEqual(4.440, resultConfig1.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 1 is incorrect");
            Assert.AreEqual(30.00, resultConfig1.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 1 is incorrect.");

            // [1] 4, 2.020, 30.01
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_NON_CODED_P2P, resultConfig2.Commands.CBTBB_Mode, "CBTBB_Mode 2 is incorrect.");
            Assert.AreEqual(2.020, resultConfig2.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 2 is incorrect");
            Assert.AreEqual(30.01, resultConfig2.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 2 is incorrect.");

            // [2] 3, 1.000, 30.02
            Assert.AreEqual(AdcpSubsystemCommands.eCBTBB_Mode.NA_3, resultConfig3.Commands.CBTBB_Mode, "CBTBB_Mode 3 is incorrect.");
            Assert.AreEqual(1.000, resultConfig3.Commands.CBTBB_PulseToPulseLag, 0.0001, "CBTBB_PulseToPulseLag 3 is incorrect");
            Assert.AreEqual(30.02, resultConfig3.Commands.CBTBB_LongRangeDepth, 0.0001, "CBTBB_LongRangeDepth 3 is incorrect.");
        }
Example #26
0
        public void TestCWPSTMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 0.400,1.001,1.002
            Assert.AreEqual(0.400, resultConfig2_1.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 2_1 Correlation Threshold is incorrect");
            Assert.AreEqual(1.001, resultConfig2_1.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 2_1 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.002, resultConfig2_1.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 2_1 V Velocity Threshold is incorrect");
            // [1] 0.500,1.003,1.004
            Assert.AreEqual(0.500, resultConfig2_2.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 2_2 Correlation Threshold is incorrect");
            Assert.AreEqual(1.003, resultConfig2_2.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 2_2 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.004, resultConfig2_2.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 2_2 V Velocity Threshold is incorrect");
            // [3] 0.700,1.007,1.008
            Assert.AreEqual(0.700, resultConfig2_3.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 2_3 Correlation Threshold is incorrect");
            Assert.AreEqual(1.007, resultConfig2_3.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 2_3 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.008, resultConfig2_3.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 2_3 V Velocity Threshold is incorrect");
            // [6] 0.300,1.013,1.014
            Assert.AreEqual(0.300, resultConfig2_4.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 2_4 Correlation Threshold is incorrect");
            Assert.AreEqual(1.013, resultConfig2_4.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 2_4 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.014, resultConfig2_4.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 2_4 V Velocity Threshold is incorrect");

            // [2] 0.600,1.005,1.006
            Assert.AreEqual(0.600, resultConfig3_1.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 3_1 Correlation Threshold is incorrect");
            Assert.AreEqual(1.005, resultConfig3_1.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 3_1 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.006, resultConfig3_1.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 3_1 V Velocity Threshold is incorrect");
            // [4] 0.800,1.009,1.010
            Assert.AreEqual(0.800, resultConfig3_2.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 3_2 Correlation Threshold is incorrect");
            Assert.AreEqual(1.009, resultConfig3_2.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 3_2 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.010, resultConfig3_2.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 3_2 V Velocity Threshold is incorrect");
            // [5] 0.900,1.011,1.012
            Assert.AreEqual(0.900, resultConfig3_3.Commands.CWPST_CorrelationThresh, 0.0001, "CWPST 3_3 Correlation Threshold is incorrect");
            Assert.AreEqual(1.011, resultConfig3_3.Commands.CWPST_QVelocityThresh, 0.0001, "CWPST 3_3 Q Velocity Threshold is incorrect");
            Assert.AreEqual(1.012, resultConfig3_3.Commands.CWPST_VVelocityThresh, 0.0001, "CWPST 3_3 V Velocity Threshold is incorrect");
        }
Example #27
0
        public void TestCBTBLMM()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemMultipleConfigurations, _multipleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig2_1 = null;
            AdcpSubsystemConfig resultConfig2_2 = null;
            AdcpSubsystemConfig resultConfig2_3 = null;
            AdcpSubsystemConfig resultConfig2_4 = null;
            AdcpSubsystemConfig resultConfig3_1 = null;
            AdcpSubsystemConfig resultConfig3_2 = null;
            AdcpSubsystemConfig resultConfig3_3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                // Subsystem 2
                if (asConfig.SubsystemConfig.SubSystem.Code == '2')
                {
                    if (resultConfig2_1 == null)
                    {
                        resultConfig2_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig2_2 == null)
                        {
                            resultConfig2_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig2_3 == null)
                            {
                                resultConfig2_3 = asConfig;
                            }
                            else
                            {
                                if (resultConfig2_4 == null)
                                {
                                    resultConfig2_4 = asConfig;
                                }
                            }
                        }
                    }
                }

                // Subsystem 3
                if (asConfig.SubsystemConfig.SubSystem.Code == '3')
                {
                    if (resultConfig3_1 == null)
                    {
                        resultConfig3_1 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3_2 == null)
                        {
                            resultConfig3_2 = asConfig;
                        }
                        else
                        {
                            if (resultConfig3_3 == null)
                            {
                                resultConfig3_3 = asConfig;
                            }
                        }
                    }
                }

            }
            #endregion

            // [0] 0.05
            Assert.AreEqual(0.05, resultConfig2_1.Commands.CBTBL, 0.0001, "CBTBL 2_1 is incorrect");
            // [1] 0.07
            Assert.AreEqual(0.07, resultConfig2_2.Commands.CBTBL, 0.0001, "CBTBL 2_2 is incorrect");
            // [3] 0.09
            Assert.AreEqual(0.09, resultConfig2_3.Commands.CBTBL, 0.0001, "CBTBL 2_3 is incorrect");
            // [6] 0.013
            Assert.AreEqual(0.013, resultConfig2_4.Commands.CBTBL, 0.0001, "CBTBL 2_4 is incorrect");

            // [2] 0.18
            Assert.AreEqual(0.18, resultConfig3_1.Commands.CBTBL, 0.0001, "CBTBL 3_1 is incorrect");
            // [4] 0.11
            Assert.AreEqual(0.11, resultConfig3_2.Commands.CBTBL, 0.0001, "CBTBL 3_2 is incorrect");
            // [5] 0.12
            Assert.AreEqual(0.12, resultConfig3_3.Commands.CBTBL, 0.0001, "CBTBL 3_3 is incorrect");
        }
Example #28
0
        public void TestCBI11()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_singleSubsystemConfiguration, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            AdcpSubsystemConfig ssConfig = null;
            foreach (AdcpSubsystemConfig ssc in config.SubsystemConfigDict.Values)
            {
                ssConfig = ssc;
            }
            #endregion

            Assert.IsNotNull(ssConfig, "Adcp Subsystem Configuration was not found.");
            Assert.AreEqual(new TimeValue(00, 00, 01, 00), ssConfig.Commands.CBI_BurstInterval, "CBI_BurstInterval is incorrect");
            Assert.AreEqual(100, ssConfig.Commands.CBI_NumEnsembles, "CBI_NumEnsembles is incorrect.");
        }
Example #29
0
        public void TestCBTMX1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            Assert.AreEqual(75.00, resultConfig1.Commands.CBTMX, 0.0001, "CBTMX 1 is incorrect");
            Assert.AreEqual(75.01, resultConfig2.Commands.CBTMX, 0.0001, "CBTMX 2 is incorrect");
            Assert.AreEqual(75.02, resultConfig3.Commands.CBTMX, 0.0001, "CBTMX 3 is incorrect");
        }
Example #30
0
        public void TestCWPAP1M()
        {
            DecodeCSHOW d = new DecodeCSHOW();
            AdcpConfiguration config = d.Decode(_multipleSubsystemConfigurations, _singleSubsystemSerialNumber);

            #region Get AdcpSubsystemConfig
            // Get Subsystem Configuration
            // Get each config based off the subsystem code
            AdcpSubsystemConfig resultConfig1 = null;
            AdcpSubsystemConfig resultConfig2 = null;
            AdcpSubsystemConfig resultConfig3 = null;
            foreach (AdcpSubsystemConfig asConfig in config.SubsystemConfigDict.Values)
            {
                if (resultConfig1 == null)
                {
                    resultConfig1 = asConfig;
                }
                else
                {
                    if (resultConfig2 == null)
                    {
                        resultConfig2 = asConfig;
                    }
                    else
                    {
                        if (resultConfig3 == null)
                        {
                            resultConfig3 = asConfig;
                        }
                    }
                }
            }
            #endregion

            // 10,0.15,0.06,0.04,0.01
            Assert.AreEqual(10, resultConfig1.Commands.CWPAP_NumPingsAvg, "CWPAP 1 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.15, resultConfig1.Commands.CWPAP_Lag, 0.0001, "CWPAP 1 Lag is incorrect.");
            Assert.AreEqual(0.06, resultConfig1.Commands.CWPAP_Blank, 0.0001, "CWPAP 1 Blank is incorrect.");
            Assert.AreEqual(0.04, resultConfig1.Commands.CWPAP_BinSize, 0.0001, "CWPAP 1 Bin Size is incorrect.");
            Assert.AreEqual(0.01, resultConfig1.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 1 Time Between Pings is incorrect.");

            // 11,0.16,0.07,0.05,0.02
            Assert.AreEqual(11, resultConfig2.Commands.CWPAP_NumPingsAvg, "CWPAP 2 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.16, resultConfig2.Commands.CWPAP_Lag, 0.0001, "CWPAP 2 Lag is incorrect.");
            Assert.AreEqual(0.07, resultConfig2.Commands.CWPAP_Blank, 0.0001, "CWPAP 2 Blank is incorrect.");
            Assert.AreEqual(0.05, resultConfig2.Commands.CWPAP_BinSize, 0.0001, "CWPAP 2 Bin Size is incorrect.");
            Assert.AreEqual(0.02, resultConfig2.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 2 Time Between Pings is incorrect.");

            // 12,0.17,0.08,0.06,0.03
            Assert.AreEqual(12, resultConfig3.Commands.CWPAP_NumPingsAvg, "CWPAP 3 Num of Pings to Average is incorrect");
            Assert.AreEqual(0.17, resultConfig3.Commands.CWPAP_Lag, 0.0001, "CWPAP 3 Lag is incorrect.");
            Assert.AreEqual(0.08, resultConfig3.Commands.CWPAP_Blank, 0.0001, "CWPAP 3 Blank is incorrect.");
            Assert.AreEqual(0.06, resultConfig3.Commands.CWPAP_BinSize, 0.0001, "CWPAP 3 Bin Size is incorrect.");
            Assert.AreEqual(0.03, resultConfig3.Commands.CWPAP_TimeBetweenPing, 0.0001, "CWPAP 3 Time Between Pings is incorrect.");
        }