//glennj 6/11/2013
        /// <summary>
        /// Sets the value of the calibration loop control
        /// </summary>
        /// <param name="awg">the AWG object</param>
        /// <param name="setMode"></param>
        public void SetCalibrationLoopControl(IAWG awg, CalibrationControlLoopMode setMode)
        {
            string setValue = "";

            switch (setMode)
            {
            case CalibrationControlLoopMode.Once:
                setValue = CalibrationControlLoopOnceSyntaxSend;
                break;

            case CalibrationControlLoopMode.Continuous:
                setValue = CalibrationControlLoopContinuousSyntaxSend;
                break;

            case CalibrationControlLoopMode.Count:
                setValue = CalibrationControlLoopCountSyntaxSend;
                break;
            }
            awg.CalLoop(setValue);
        }
        public void CalibrationLoopControlShouldBe(IAWG awg, CalibrationControlLoopMode expectedMode)
        {
            string expectedSyntax = "";

            switch (expectedMode)
            {
            case CalibrationControlLoopMode.Once:
                expectedSyntax = CalibrationControlLoopOnceSyntaxReceived;
                break;

            case CalibrationControlLoopMode.Continuous:
                expectedSyntax = CalibrationControlLoopContinuousSyntaxReceived;
                break;

            case CalibrationControlLoopMode.Count:
                expectedSyntax = CalibrationControlLoopCountSyntaxReceived;
                break;
            }

            const string possibleErrorMessage = "Checking the calibration loop control.";

            Assert.AreEqual(expectedSyntax, awg.CalibrationLoopState, possibleErrorMessage);
        }