//jmanning 09/22/2014
        /// <summary>
        /// Verify the AWG output mode for an expected signal path
        /// </summary>
        /// <param name="awg"></param>
        /// <param name="expectedModeType"></param>
        public void OutputModeTypeShouldBe(IAWG awg, OutputModeType expectedModeType)
        {
            var    expectedSyntax      = (expectedModeType == OutputModeType.Direct) ? SyntaxForOutputModeDirect : SyntaxForOutputModeAC;
            string possibleErrorString = "Output mode " + awg.OutputModeType + " found not the expected mode of " + expectedSyntax;

            Assert.AreEqual(expectedSyntax, awg.OutputModeType, possibleErrorString);
        }
 public async Task SetOutputModeAsync(OutputModeType outputMode)
 {
     if (OutputMode != outputMode)
     {
         OutputMode = outputMode;
         await OnSetOutputModeAsync(outputMode);
     }
 }
        //shkv 12/9/2014 Modified the region name
        //jmanning 09/22/2014
        /// <summary>
        /// Using OUTPut[n]:MODE sets the signal path [DIRect|AC]
        /// </summary>
        /// <param name="awg">Object</param>
        /// <param name="outputIndex">Index of output</param>
        /// <param name="signalPath">Signal Path Type of Filter [DIRect|AC]</param>
        public void SetOutputMode(IAWG awg, string outputIndex, OutputModeType signalPath)
        {
            string expectedSyntax = "Not Valid Signal Path";

            switch (signalPath)
            {
            case OutputModeType.AC:
                expectedSyntax = SyntaxForOutputModeAC;
                break;

            case OutputModeType.Direct:
                expectedSyntax = SyntaxForOutputModeDirect;
                break;
            }
            awg.SetOutputMode(outputIndex, expectedSyntax);
        }
Example #4
0
        /// <summary>
        /// Create a new instance of OfficePlate
        /// </summary>
        public OfficePlate()
        {
            _Tags = new TagCollections(this, typeof(TagItem));
            _DataSource = new DataSourceCollections(this, typeof(DataSourceItem));

            _EmailAddress = string.Empty;
            _EmailTitle = string.Empty;
            _OfficeFile = string.Empty;
            _OutputFileName = string.Empty;
            _OutputPath = string.Empty;
            _OutputMode = OutputModeType.None;
            _PlateMode = PlateModeType.Xml;
            _FilePath = string.Empty;
        }
 protected override async Task OnSetOutputModeAsync(OutputModeType outputMode)
 {
     var outputValue = OutputMode == OutputModeType.Low ? OutputLowValue : OutputHighValue;
     await FileUtils.AppendTextAsync(_outputModeFilePath, outputValue);
 }
 protected abstract Task OnSetOutputModeAsync(OutputModeType outputMode);