Big changes
This commit is contained in:
438
Source/TSRealLib/HAL/Interfaces/IDmm/AbstractDmm.cs
Normal file
438
Source/TSRealLib/HAL/Interfaces/IDmm/AbstractDmm.cs
Normal file
@@ -0,0 +1,438 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** AbstractDmm.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Raytheon.Units;
|
||||
using Raytheon.Instruments.Dmm;
|
||||
|
||||
//disable the no xml warning on this abstract class
|
||||
#pragma warning disable 1591
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// AbstractDmm - will do a bunch of work for DMM's as to keep the code to do that work
|
||||
/// in a single place
|
||||
/// </summary>
|
||||
public abstract class AbstractDmm : IDmm
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private volatile object _configurationLock = new object();
|
||||
private MeasurementFunction _currentMeasurementType = MeasurementFunction.None;
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDmm Interface
|
||||
|
||||
#region Voltage Measurements
|
||||
|
||||
/// <summary>
|
||||
/// Configures a voltage measurement, but first checks if the type is valid.
|
||||
/// </summary>
|
||||
public void ConfigureVoltageMeasurement(MeasurementFunction type, Voltage range, Voltage resolution)
|
||||
{
|
||||
//lock the configuration while checking it out
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (type)
|
||||
{
|
||||
case MeasurementFunction.ACPlusDCVolts:
|
||||
case MeasurementFunction.ACVolts:
|
||||
case MeasurementFunction.DCVolts:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementConfigurationException(type, "Voltage units do not match the measurement type");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
InternalConfigureVoltageMeasurement(type, range, resolution);
|
||||
//only set the type if the configure passed
|
||||
_currentMeasurementType = type;
|
||||
}
|
||||
catch (InstrumentException ex)
|
||||
{
|
||||
_currentMeasurementType = MeasurementFunction.None;
|
||||
throw new InvalidMeasurementConfigurationException(type, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the voltage measurement in the implementation class
|
||||
/// </summary>
|
||||
/// <param name="type">The voltage specific type of measurement.</param>
|
||||
/// <param name="range">The range.</param>
|
||||
/// <param name="resolution">The resolution.</param>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the configuration does not take, the abstract class will
|
||||
/// catch that and fail the configuration
|
||||
/// </remarks>
|
||||
protected abstract void InternalConfigureVoltageMeasurement(MeasurementFunction type, Voltage range, Voltage resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - locks on the configuration and then makes sure the proper type is selected
|
||||
/// then, calls the abstract class to do the work
|
||||
/// </summary>
|
||||
public Voltage MeasureVoltage(int timeout)
|
||||
{
|
||||
//lock the configuration while measuring
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (_currentMeasurementType)
|
||||
{
|
||||
case MeasurementFunction.ACPlusDCVolts:
|
||||
case MeasurementFunction.ACVolts:
|
||||
case MeasurementFunction.DCVolts:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementRequestException(_currentMeasurementType, "Voltage units do not match the configured measurement type");
|
||||
}
|
||||
|
||||
return InternalMeasureVoltage(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// voltage measurement in the implementation class.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The timeout.</param>
|
||||
/// <returns>measured voltage</returns>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the measurement fails
|
||||
/// </remarks>
|
||||
protected abstract Voltage InternalMeasureVoltage(int timeout);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Current Measurements
|
||||
|
||||
/// <summary>
|
||||
/// Configures a current measurement, but first checks if the type is valid.
|
||||
/// </summary>
|
||||
public void ConfigureCurrentMeasurement(MeasurementFunction type, Current range, Current resolution)
|
||||
{
|
||||
//lock the configuration while checking it out
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (type)
|
||||
{
|
||||
case MeasurementFunction.ACCurrent:
|
||||
case MeasurementFunction.ACPlusDCCurrent:
|
||||
case MeasurementFunction.DCCurrent:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementConfigurationException(type, "Current units do not match the measurement type");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
InternalConfigureCurrentMeasurement(type, range, resolution);
|
||||
//only set the type if the configure passed
|
||||
_currentMeasurementType = type;
|
||||
}
|
||||
catch (InstrumentException ex)
|
||||
{
|
||||
_currentMeasurementType = MeasurementFunction.None;
|
||||
throw new InvalidMeasurementConfigurationException(type, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the current measurement in the implementation class
|
||||
/// </summary>
|
||||
/// <param name="type">The current specific type of measurement.</param>
|
||||
/// <param name="range">The range.</param>
|
||||
/// <param name="resolution">The resolution.</param>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the configuration does not take, the abstract class will
|
||||
/// catch that and fail the configuration
|
||||
/// </remarks>
|
||||
protected abstract void InternalConfigureCurrentMeasurement(MeasurementFunction type, Current range, Current resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - locks on the configuration and then makes sure the proper type is selected
|
||||
/// then, calls the abstract class to do the work
|
||||
/// </summary>
|
||||
public Current MeasureCurrent(int timeout)
|
||||
{
|
||||
//lock the configuration while measuring
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (_currentMeasurementType)
|
||||
{
|
||||
case MeasurementFunction.ACCurrent:
|
||||
case MeasurementFunction.ACPlusDCCurrent:
|
||||
case MeasurementFunction.DCCurrent:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementRequestException(_currentMeasurementType, "Current units do not match the configured measurement type");
|
||||
}
|
||||
|
||||
return InternalMeasureCurrent(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Current measurement in the implementation class.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The timeout.</param>
|
||||
/// <returns>measured current</returns>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the measurement fails
|
||||
/// </remarks>
|
||||
protected abstract Current InternalMeasureCurrent(int timeout);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Resistance Measurements
|
||||
|
||||
/// <summary>
|
||||
/// Configures a resistance measurement, but first checks if the type is valid.
|
||||
/// </summary>
|
||||
public void ConfigureResistanceMeasurement(MeasurementFunction type, Resistance range, Resistance resolution)
|
||||
{
|
||||
//lock the configuration while checking it out
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (type)
|
||||
{
|
||||
case MeasurementFunction.FourWireResistance:
|
||||
case MeasurementFunction.TwoWireResistance:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementConfigurationException(type, "Resistance units do not match the measurement type");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
InternalConfigureResistanceMeasurement(type, range, resolution);
|
||||
//only set the type if the configure passed
|
||||
_currentMeasurementType = type;
|
||||
}
|
||||
catch (InstrumentException ex)
|
||||
{
|
||||
_currentMeasurementType = MeasurementFunction.None;
|
||||
throw new InvalidMeasurementConfigurationException(type, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the resistance measurement in the implementation class
|
||||
/// </summary>
|
||||
/// <param name="type">The resistance specific type of measurement.</param>
|
||||
/// <param name="range">The range.</param>
|
||||
/// <param name="resolution">The resolution.</param>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the configuration does not take, the abstract class will
|
||||
/// catch that and fail the configuration
|
||||
/// </remarks>
|
||||
protected abstract void InternalConfigureResistanceMeasurement(MeasurementFunction type, Resistance range, Resistance resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - locks on the configuration and then makes sure the proper type is selected
|
||||
/// then, calls the abstract class to do the work
|
||||
/// </summary>
|
||||
public Resistance MeasureResistance(int timeout)
|
||||
{
|
||||
//lock the configuration while measuring
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (_currentMeasurementType)
|
||||
{
|
||||
case MeasurementFunction.FourWireResistance:
|
||||
case MeasurementFunction.TwoWireResistance:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementRequestException(_currentMeasurementType, "Current units do not match the configured measurement type");
|
||||
}
|
||||
|
||||
return InternalMeasureResistance(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resistance measurement in the implementation class.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The timeout.</param>
|
||||
/// <returns>measured Resistance</returns>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the measurement fails
|
||||
/// </remarks>
|
||||
protected abstract Resistance InternalMeasureResistance(int timeout);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Frequency Measurements
|
||||
|
||||
/// <summary>
|
||||
/// Configures a frequency measurement, but first checks if the type is valid.
|
||||
/// </summary>
|
||||
public void ConfigureFrequencyMeasurement(MeasurementFunction type, Frequency range, Frequency resolution)
|
||||
{
|
||||
//lock the configuration while checking it out
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (type)
|
||||
{
|
||||
case MeasurementFunction.Frequency:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementConfigurationException(type, "Frequency units do not match the measurement type");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
InternalConfigureFrequencyMeasurement(type, range, resolution);
|
||||
//only set the type if the configure passed
|
||||
_currentMeasurementType = type;
|
||||
}
|
||||
catch (InstrumentException ex)
|
||||
{
|
||||
_currentMeasurementType = MeasurementFunction.None;
|
||||
throw new InvalidMeasurementConfigurationException(type, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the frequency measurement in the implementation class
|
||||
/// </summary>
|
||||
/// <param name="type">The frequency specific type of measurement.</param>
|
||||
/// <param name="range">The range.</param>
|
||||
/// <param name="resolution">The resolution.</param>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the configuration does not take, the abstract class will
|
||||
/// catch that and fail the configuration
|
||||
/// </remarks>
|
||||
protected abstract void InternalConfigureFrequencyMeasurement(MeasurementFunction type, Frequency range, Frequency resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - locks on the configuration and then makes sure the proper type is selected
|
||||
/// then, calls the abstract class to do the work
|
||||
/// </summary>
|
||||
public Frequency MeasureFrequency(int timeout)
|
||||
{
|
||||
//lock the configuration while measuring
|
||||
lock (_configurationLock)
|
||||
{
|
||||
//validate the measurement type
|
||||
switch (_currentMeasurementType)
|
||||
{
|
||||
case MeasurementFunction.Frequency:
|
||||
break;
|
||||
default:
|
||||
throw new InvalidMeasurementRequestException(_currentMeasurementType, "Frequency units do not match the configured measurement type");
|
||||
}
|
||||
|
||||
return InternalMeasureFrequency(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Frequency measurement in the implementation class.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The timeout.</param>
|
||||
/// <returns>measured Frequency</returns>
|
||||
/// <remarks>
|
||||
/// throw an InstrumentException if the measurement fails
|
||||
/// </remarks>
|
||||
protected abstract Frequency InternalMeasureFrequency(int timeout);
|
||||
|
||||
#endregion
|
||||
|
||||
public MeasurementFunction MeasurementType
|
||||
{
|
||||
get
|
||||
{
|
||||
MeasurementFunction func = MeasurementFunction.None;
|
||||
lock (_configurationLock)
|
||||
{
|
||||
func = _currentMeasurementType;
|
||||
}
|
||||
return func;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// <summary>
|
||||
// The IInstrument interface is completely up to the impl class
|
||||
// </summary>
|
||||
#region IInstrument Interface
|
||||
|
||||
public abstract bool ClearErrors();
|
||||
|
||||
public abstract string DetailedStatus { get; protected set; }
|
||||
|
||||
public abstract bool DisplayEnabled { get; set; }
|
||||
|
||||
public abstract bool FrontPanelEnabled { get; set; }
|
||||
|
||||
public abstract InstrumentMetadata Info { get; }
|
||||
|
||||
public abstract void Initialize();
|
||||
|
||||
public abstract string Name { get; protected set; }
|
||||
|
||||
public abstract SelfTestResult PerformSelfTest();
|
||||
|
||||
public abstract void Reset();
|
||||
|
||||
public abstract SelfTestResult SelfTestResult { get; protected set; }
|
||||
|
||||
public abstract void Shutdown();
|
||||
|
||||
public abstract State Status { get; protected set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,27 @@
|
||||
<Dictionary>
|
||||
<Words>
|
||||
<Unrecognized>
|
||||
<Word></Word>
|
||||
</Unrecognized>
|
||||
<Recognized>
|
||||
<Word>Dmm</Word>
|
||||
</Recognized>
|
||||
<Deprecated>
|
||||
<Term PreferredAlternate=""></Term>
|
||||
</Deprecated>
|
||||
<Compound>
|
||||
<Term CompoundAlternate=""></Term>
|
||||
</Compound>
|
||||
<DiscreteExceptions>
|
||||
<Term></Term>
|
||||
</DiscreteExceptions>
|
||||
</Words>
|
||||
<Acronyms>
|
||||
<CasingExceptions>
|
||||
<!-- Full Blown Explanation -->
|
||||
<Acronym>FBE</Acronym>
|
||||
<!-- Raytheon Instrument Service -->
|
||||
<Acronym>RINSS</Acronym>
|
||||
</CasingExceptions>
|
||||
</Acronyms>
|
||||
</Dictionary>
|
||||
18
Source/TSRealLib/HAL/Interfaces/IDmm/Dmm.Contracts.cd
Normal file
18
Source/TSRealLib/HAL/Interfaces/IDmm/Dmm.Contracts.cd
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1" MembersFormat="FullSignature">
|
||||
<Interface Name="Raytheon.Instruments.IDmm">
|
||||
<Position X="0.5" Y="0.5" Width="6.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAEAAAgAAAAAAAYAIAAQAAAMAAAABAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>IDmm.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Enum Name="Raytheon.Instruments.Dmm.MeasurementFunction">
|
||||
<Position X="0.5" Y="3.75" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAASAAQAAAAAAAAAAAABAgAIAAAAAAAAQAAAEAAgI=</HashCode>
|
||||
<FileName>MeasurementFunction.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
68
Source/TSRealLib/HAL/Interfaces/IDmm/DmmTriggerSource.cs
Normal file
68
Source/TSRealLib/HAL/Interfaces/IDmm/DmmTriggerSource.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** DmmTriggerSource.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
//*** currently not used, but left for possible future enhancements
|
||||
|
||||
namespace Raytheon.Instruments.Dmm
|
||||
{
|
||||
/// <summary>
|
||||
/// TriggerSource - enum for the type of trigger to use when measuring
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public enum TriggerSource
|
||||
{
|
||||
/// <summary>
|
||||
/// measure immediately
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Immediate,
|
||||
|
||||
/// <summary>
|
||||
/// use external trigger
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
External,
|
||||
|
||||
/// <summary>
|
||||
/// user software trigger
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Software
|
||||
}
|
||||
}
|
||||
53
Source/TSRealLib/HAL/Interfaces/IDmm/GlobalSuppressions.cs
Normal file
53
Source/TSRealLib/HAL/Interfaces/IDmm/GlobalSuppressions.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** GlobalSuppressions.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
//
|
||||
// To add a suppression to this file, right-click the message in the
|
||||
// Error List, point to "Suppress Message(s)", and click
|
||||
// "In Project Suppression File".
|
||||
// You do not need to add suppressions to this file manually.
|
||||
|
||||
//none of our RINSS assemblies will be CLS compliant
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]
|
||||
|
||||
//constructors need the unitized values for information about the range exception
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Scope = "type", Target = "Raytheon.Instruments.OverRangeException")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Raytheon.Instruments")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Raytheon.Instruments.Dmm")]
|
||||
131
Source/TSRealLib/HAL/Interfaces/IDmm/IDmm.cs
Normal file
131
Source/TSRealLib/HAL/Interfaces/IDmm/IDmm.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** IDmm.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using Raytheon.Communication;
|
||||
using Raytheon.Instruments.Dmm;
|
||||
using Raytheon.Units;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// IDmm - simple interface to a DMM device
|
||||
/// </summary>
|
||||
[UmsContract]
|
||||
public interface IDmm : IInstrument
|
||||
{
|
||||
/// <summary>
|
||||
/// Configures a voltage measurement.
|
||||
/// </summary>
|
||||
/// <param name="type">a valid voltage measurement type.</param>
|
||||
/// <param name="range">The measurement range.</param>
|
||||
/// <param name="resolution">The measurement resolution.</param>
|
||||
[UmsCommand("IDmm.ConfigureVoltageMeasurement")]
|
||||
void ConfigureVoltageMeasurement(MeasurementFunction type, Voltage range, Voltage resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Configures a current measurement.
|
||||
/// </summary>
|
||||
/// <param name="type">a valid current measurement type.</param>
|
||||
/// <param name="range">The measurement range.</param>
|
||||
/// <param name="resolution">The measurement resolution.</param>
|
||||
[UmsCommand("IDmm.ConfigureCurrentMeasurement")]
|
||||
void ConfigureCurrentMeasurement(MeasurementFunction type, Current range, Current resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Configures a resistance measurement.
|
||||
/// </summary>
|
||||
/// <param name="type">a valid resistance measurement type.</param>
|
||||
/// <param name="range">The measurement range.</param>
|
||||
/// <param name="resolution">The measurement resolution.</param>
|
||||
[UmsCommand("IDmm.ConfigureResistanceMeasurement")]
|
||||
void ConfigureResistanceMeasurement(MeasurementFunction type, Resistance range, Resistance resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Configures a Frequency measurement.
|
||||
/// </summary>
|
||||
/// <param name="type">a valid Frequency measurement type.</param>
|
||||
/// <param name="range">The measurement range.</param>
|
||||
/// <param name="resolution">The measurement resolution.</param>
|
||||
[UmsCommand("IDmm.ConfigureFrequencyMeasurement")]
|
||||
void ConfigureFrequencyMeasurement(MeasurementFunction type, Frequency range, Frequency resolution);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - Voltage measurement with current measurement configuration
|
||||
/// </summary>
|
||||
/// <param name="timeout">time to try operation before returning (milliseconds)</param>
|
||||
/// <returns>the measured voltage</returns>
|
||||
[UmsCommand("IDmm.MeasureVoltage")]
|
||||
Voltage MeasureVoltage(int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - Current measurement with current measurement configuration
|
||||
/// </summary>
|
||||
/// <param name="timeout">time to try operation before returning (milliseconds)</param>
|
||||
/// <returns>the measured current</returns>
|
||||
[UmsCommand("IDmm.MeasureCurrent")]
|
||||
Current MeasureCurrent(int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - Resistance measurement with current measurement configuration
|
||||
/// </summary>
|
||||
/// <param name="timeout">time to try operation before returning (milliseconds)</param>
|
||||
/// <returns>the measured resistance</returns>
|
||||
[UmsCommand("IDmm.MeasureResistance")]
|
||||
Resistance MeasureResistance(int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Measure - frequency measurement with current measurement configuration
|
||||
/// </summary>
|
||||
/// <param name="timeout">time to try operation before returning (milliseconds)</param>
|
||||
/// <returns>the measured frequency</returns>
|
||||
[UmsCommand("IDmm.MeasureFrequency")]
|
||||
Frequency MeasureFrequency(int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the measurement.
|
||||
/// </summary>
|
||||
/// <remarks>cannot set during a measurement</remarks>
|
||||
/// <value>
|
||||
/// The type of the measurement.
|
||||
/// </value>
|
||||
MeasurementFunction MeasurementType
|
||||
{
|
||||
[UmsCommand("IDmm.GetMeasurementType")]
|
||||
get;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Source/TSRealLib/HAL/Interfaces/IDmm/IDmm.csproj
Normal file
23
Source/TSRealLib/HAL/Interfaces/IDmm/IDmm.csproj
Normal file
@@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="$(SolutionDir)Solution.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<AssemblyName>Raytheon.Instruments.Dmm.Contracts</AssemblyName>
|
||||
<Description>DMM Instrument Interface</Description>
|
||||
<Product>HAL</Product>
|
||||
|
||||
<!-- Static versioning (Suitable for Development) -->
|
||||
<!-- Disable the line below for dynamic versioning -->
|
||||
<Version>2.6.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Raytheon.Communication.Rpc.Contracts" Version="1.*" />
|
||||
<PackageReference Include="Raytheon.Communication.Ums.Core.Contracts" Version="1.*" />
|
||||
<PackageReference Include="Raytheon.Communication.Ums.Rpc.Attributes" Version="1.*" />
|
||||
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
|
||||
<PackageReference Include="Raytheon.Common" Version="1.*" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,117 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** InvalidMeasurementConfigurationException.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
using Raytheon.Instruments.Dmm;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// InvalidMeasurementConfigurationException - exception thrown when client attempts to configure an invalid measurement combo
|
||||
/// of type and units
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
|
||||
public class InvalidMeasurementConfigurationException : InstrumentException
|
||||
{
|
||||
#region Public Exception Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the attempted measurement.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The attempted measurement type
|
||||
/// </value>
|
||||
[DataMember]
|
||||
public MeasurementFunction AttemptedMeasurementType { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementConfigurationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
public InvalidMeasurementConfigurationException(MeasurementFunction measurementFunction)
|
||||
: base()
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementConfigurationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
public InvalidMeasurementConfigurationException(MeasurementFunction measurementFunction, string message)
|
||||
: base(message)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementConfigurationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="innerException">The inner exception.</param>
|
||||
public InvalidMeasurementConfigurationException(MeasurementFunction measurementFunction, string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementConfigurationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <param name="context">The context.</param>
|
||||
public InvalidMeasurementConfigurationException(MeasurementFunction measurementFunction, SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** InvalidMeasurementRequestException.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
using Raytheon.Instruments.Dmm;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// InvalidMeasurementRequestException - exception thrown when client attempts to take the not currently
|
||||
/// configured measurement
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
|
||||
public class InvalidMeasurementRequestException : InstrumentException
|
||||
{
|
||||
#region Public Exception Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the attempted measurement.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The attempted measurement type
|
||||
/// </value>
|
||||
[DataMember]
|
||||
public MeasurementFunction AttemptedMeasurementType { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementRequestException"/> class.
|
||||
/// with a NONE measurement type
|
||||
/// </summary>
|
||||
public InvalidMeasurementRequestException()
|
||||
: base()
|
||||
{
|
||||
AttemptedMeasurementType = MeasurementFunction.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementRequestException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
public InvalidMeasurementRequestException(MeasurementFunction measurementFunction)
|
||||
: base()
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementRequestException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
public InvalidMeasurementRequestException(MeasurementFunction measurementFunction, string message)
|
||||
: base(message)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementRequestException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="innerException">The inner exception.</param>
|
||||
public InvalidMeasurementRequestException(MeasurementFunction measurementFunction, string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidMeasurementRequestException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <param name="context">The context.</param>
|
||||
public InvalidMeasurementRequestException(MeasurementFunction measurementFunction, SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
AttemptedMeasurementType = measurementFunction;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
108
Source/TSRealLib/HAL/Interfaces/IDmm/MeasurementFunction.cs
Normal file
108
Source/TSRealLib/HAL/Interfaces/IDmm/MeasurementFunction.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** MeasurementFunction.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Raytheon.Instruments.Dmm
|
||||
{
|
||||
/// <summary>
|
||||
/// MeasurementFunction - enum for the different DMM capabilities
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public enum MeasurementFunction
|
||||
{
|
||||
/// <summary>
|
||||
/// empty measurement
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
None,
|
||||
|
||||
/// <summary>
|
||||
/// measure dc volts
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
DCVolts,
|
||||
|
||||
/// <summary>
|
||||
/// measure ac volts
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
ACVolts,
|
||||
|
||||
/// <summary>
|
||||
/// measure dc current
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
DCCurrent,
|
||||
|
||||
/// <summary>
|
||||
/// measure ac current
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
ACCurrent,
|
||||
|
||||
/// <summary>
|
||||
/// measure two wire resistance
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
TwoWireResistance,
|
||||
|
||||
/// <summary>
|
||||
/// measure four wire resistance
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
FourWireResistance,
|
||||
|
||||
/// <summary>
|
||||
/// measure ac plus dc volts
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
ACPlusDCVolts,
|
||||
|
||||
/// <summary>
|
||||
/// measure ac plus dc current
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
ACPlusDCCurrent,
|
||||
|
||||
/// <summary>
|
||||
/// measure frequency
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Frequency,
|
||||
}
|
||||
}
|
||||
114
Source/TSRealLib/HAL/Interfaces/IDmm/OverRangeException.cs
Normal file
114
Source/TSRealLib/HAL/Interfaces/IDmm/OverRangeException.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
// *******************************************************************************************
|
||||
// ** **
|
||||
// ** OverRangeException.cs
|
||||
// ** 4/14/2023
|
||||
// ** **
|
||||
// ** RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION **
|
||||
// ** PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS **
|
||||
// ** AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT.DISCLOSURE TO **
|
||||
// ** UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO **
|
||||
// ** RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS **
|
||||
// ** CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS **
|
||||
// ** OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON **
|
||||
// ** COMPANY. **
|
||||
// ** **
|
||||
// ** THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. **
|
||||
// ** GOVERNMENT. **
|
||||
// ** **
|
||||
// ** UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY 2023.
|
||||
// ** **
|
||||
// ** WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE **
|
||||
// ** EXPORT OR DISCLOSURE TO NON-U.S.PERSONS, WHEREVER LOCATED, IS RESTRICTED **
|
||||
// ** BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R.SECTION **
|
||||
// ** 120-130) OR THE EXPORT ADMINISTRATION REGULATIONS(EAR) (15 C.F.R.SECTION **
|
||||
// ** 730-774). THIS DOCUMENT CANNOT BE EXPORTED(E.G., PROVIDED TO A SUPPLIER **
|
||||
// ** OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S.PERSON, WHEREVER **
|
||||
// ** LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS **
|
||||
// ** BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S.GOVERNMENT **
|
||||
// ** APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL **
|
||||
// ** PENALTIES. **
|
||||
// ** **
|
||||
// ** CAPITAL EQUIPMENT/SOFTWARE: THIS TECHNICAL DATA WAS DEVELOPED OR ACQUIRED **
|
||||
// ** EXCLUSIVELY AT CONTRACTOR EXPENSE AND IS INTENDED FOR USE ON MULTIPLE **
|
||||
// ** PROJECTS/PROGRAMS. **
|
||||
// ** **
|
||||
// *******************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
using Raytheon.Instruments.Dmm;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// OverRangeException - exception thrown when range is exceeded
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class OverRangeException : InstrumentException
|
||||
{
|
||||
#region Public Exception Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the attempted measurement.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The attempted measurement type
|
||||
/// </value>
|
||||
[DataMember]
|
||||
public MeasurementFunction AttemptedMeasurement { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OverRangeException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
public OverRangeException(MeasurementFunction measurementFunction)
|
||||
: base()
|
||||
{
|
||||
AttemptedMeasurement = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OverRangeException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
public OverRangeException(MeasurementFunction measurementFunction, string message)
|
||||
: base(message)
|
||||
{
|
||||
AttemptedMeasurement = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OverRangeException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="innerException">The inner exception.</param>
|
||||
public OverRangeException(MeasurementFunction measurementFunction, string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
AttemptedMeasurement = measurementFunction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OverRangeException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="measurementFunction">The measurement function.</param>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <param name="context">The context.</param>
|
||||
public OverRangeException(MeasurementFunction measurementFunction, SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
AttemptedMeasurement = measurementFunction;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user