Big changes

This commit is contained in:
Duc
2025-03-13 12:04:22 -07:00
parent c689fcb7f9
commit ffa9905494
748 changed files with 199255 additions and 3743 deletions

View File

@@ -0,0 +1,18 @@
// 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.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "RINSS")]
[assembly: SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Scope = "member", Target = "Raytheon.Instruments.IInstrumentProxyFactory.#GetSupportedInterfaces()")]
[assembly: SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Scope = "member", Target = "Raytheon.Instruments.IInstrumentFactory.#GetSupportedInterfaces()")]
[assembly: SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Scope = "type", Target = "Raytheon.Instruments.InstrumentException")]

View File

@@ -0,0 +1,151 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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 Raytheon.Communication;
namespace Raytheon.Instruments
{
/// <summary>
/// IInstrument - RINSS generic instrument interface, that all instruments MUST implement
/// </summary>
public interface IInstrument
{
/// <summary>
/// ClearErrors - clear existing errors but leave options in current state
/// </summary>
/// <returns>returns true if errors are successfully cleared</returns>
[UmsCommand("RINSS.IInstrument.ClearErrors")]
bool ClearErrors();
/// <summary>
/// DetailedStatus - will contain detailed information about the current state of the instrument
/// </summary>
String DetailedStatus
{
[UmsCommand("RINSS.IInstrument.GetDetailedStatus")]
get;
}
/// <summary>
/// DisplayEnabled - some instruments will be no-op, but likely needed on all
/// will shut down any display on the hardware to hide any
/// classified information if visible
/// </summary>
bool DisplayEnabled
{
[UmsCommand("RINSS.IInstrument.GetDisplayEnabled")]
get;
[UmsCommand("RINSS.IInstrument.SetDisplayEnabled")]
set;
}
/// <summary>
/// FrontPanelEnabled - some instruments will be no-op, but likely needed on all
/// has the ability to disable any panel buttons, so that
/// the hardware may not be changed by human touch
/// </summary>
bool FrontPanelEnabled
{
[UmsCommand("RINSS.IInstrument.GetFrontPanelEnabled")]
get;
[UmsCommand("RINSS.IInstrument.SetFrontPanelEnabled")]
set;
}
/// <summary>
/// Info - extra instrument information, currently only model number information
/// </summary>
InstrumentMetadata Info
{
[UmsCommand("RINSS.IInstrument.GetInfo")]
get;
}
/// <summary>
/// Initialize - remove any state knowledge from the hardware and call any
/// initialize methods needed. this may take time and differs only
/// from reset by the fact it may power cycle or do something more than
/// settings to the instrument
/// </summary>
[UmsCommand("RINSS.IInstrument.Initialize")]
void Initialize();
/// <summary>
/// Name - unique identifier for the instrument
/// </summary>
string Name
{
[UmsCommand("RINSS.IInstrument.GetName")]
get;
}
/// <summary>
/// PerformSelfTest - do a hardware self test
/// </summary>
/// <returns>result of the self test</returns>
[UmsCommand("RINSS.IInstrument.PerformSelfTest")]
SelfTestResult PerformSelfTest();
/// <summary>
/// Reset - put state of the unit back to startup state
/// </summary>
[UmsCommand("RINSS.IInstrument.Reset")]
void Reset();
/// <summary>
/// SelfTestResult - end result of the hardware self test performed
/// </summary>
SelfTestResult SelfTestResult
{
[UmsCommand("RINSS.IInstrument.GetSelfTestResult")]
get;
}
/// <summary>
/// Shutdown - could potentially turn off the instrument
/// </summary>
[UmsCommand("RINSS.IInstrument.Shutdown")]
void Shutdown();
/// <summary>
/// Status - current state infromation
/// </summary>
State Status
{
[UmsCommand("RINSS.IInstrument.GetStatus")]
get;
}
}
}

View File

@@ -0,0 +1,65 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Communication;
namespace Raytheon.Instruments
{
/// <summary>
/// IInstrumentFactory - interface for RINSS's factory pattern, each of these should create
/// instruments of the types they support
/// </summary>
public interface IInstrumentFactory
{
/// <summary>
/// GetInstrument - main call to a factory to get an instrument it can create
/// </summary>
/// <remarks>do not pass IInstrument objects via RPC, it is a copy of the object</remarks>
/// <param name="name">unique name of the instrument</param>
/// <returns>null if instrument cannot be found, otherwise the instrument implementation</returns>
IInstrument GetInstrument(string name);
object GetInstrument(string name, bool simulateHw);
/// <summary>
/// GetSupportedInterfaces - used to get all the types of instruments a factory could be used
/// to create.
/// </summary>
/// <returns>collection of specific instrument types it can create</returns>
[UmsCommand("RINSS.IInstrumentFactory.GetSupportedInterfaces")]
ICollection<Type> GetSupportedInterfaces();
}
}

View File

@@ -0,0 +1,50 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
/// <summary>
/// IInstrumentFactoryInfo - interface for meta data about the instrument factory
/// </summary>
public interface IInstrumentFactoryInfo
{
/// <summary>
/// ModelNumber - a unique identifier for the instrument factory
/// </summary>
string ModelNumber { get; }
}
}

View File

@@ -0,0 +1,70 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Communication;
using Raytheon.Communication.Rpc;
namespace Raytheon.Instruments
{
/// <summary>
/// IInstrumentProxyFactory - interface to a proxy instrument factory, used to identify
/// the ums piece that will do the proxy'ing
/// </summary>
public interface IInstrumentProxyFactory
{
/// <summary>
/// Initialize - sets up the factory with the ums components it needs to distribute
/// the proxy instruments
/// </summary>
/// <param name="umsHost">the port used to proxy</param>
/// <param name="umsClientFactory">the factory associated with port to create the clients</param>
void Initialize(IUms umsHost, IUmsClientFactory umsClientFactory);
/// <summary>
/// GetInstrument - get a proxy'd instrument
/// </summary>
/// <param name="name">unique name of the instrument</param>
/// <returns>null if the instrument does not exist and the instrument implementation if it does</returns>
IInstrument GetInstrument(string name);
/// <summary>
/// GetSupportedInterfaces - discovery about the factory to find out which instruments
/// it provides proxies to
/// </summary>
/// <returns>collection of supported interface names</returns>
ICollection<string> GetSupportedInterfaces();
}
}

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1" MembersFormat="FullSignature">
<Class Name="Raytheon.Instruments.InstrumentProxyFactory&lt;T&gt;">
<Position X="7" Y="0.5" Width="4.5" />
<TypeIdentifier>
<HashCode>AAgAABAGAAAAAQCAAAAAAAgAQAAAAAAAQAAAAAAAAAA=</HashCode>
<FileName>InstrumentProxyFactory.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Interface Name="Raytheon.Instruments.IInstrument">
<Position X="0.5" Y="0.5" Width="2.75" />
<TypeIdentifier>
<HashCode>AAAAAAAEAAAABQAAIAAAAQYEAAAAAAAQAAAAAEAAiAA=</HashCode>
<FileName>IInstrument.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="Raytheon.Instruments.IInstrumentFactory">
<Position X="3.5" Y="0.5" Width="3.25" />
<TypeIdentifier>
<HashCode>AAgAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>IInstrumentFactory.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="Raytheon.Instruments.IInstrumentProxyFactory">
<Position X="7" Y="3.75" Width="4.5" />
<TypeIdentifier>
<HashCode>AAgAAAAAAAAAAQAAAAAAAAgAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>IInstrumentProxyFactory.cs</FileName>
</TypeIdentifier>
</Interface>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -0,0 +1,104 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments
{
public abstract class Instrument
{
/// <summary>
/// DetailedStatus - will contain detailed information about the current state of the instrument
/// </summary>
public string DetailedStatus
{
get;
set;
}
/// <summary>
/// Info - extra instrument information, currently only model number information
/// </summary>
public InstrumentMetadata Info
{
get;
set;
}
/// <summary>
/// Name - unique identifier for the instrument
/// </summary>
public string Name
{
get;
set;
}
/// <summary>
/// Status - current state infromation
/// </summary>
public State Status
{
get;
set;
}
/// <summary>
/// ClearErrors - clear existing errors but leave options in current state
/// </summary>
/// <returns>returns true if errors are successfully cleared</returns>
public abstract bool ClearErrors();
/// <summary>
/// Initialize - remove any state knowledge from the hardware and call any
/// initialize methods needed. this may take time and differs only
/// from reset by the fact it may power cycle or do something more than
/// settings to the instrument
/// </summary>
public abstract void Initialize();
/// <summary>
/// Reset - put state of the unit back to startup state
/// </summary>
public abstract void Reset();
/// <summary>
/// Shutdown - could potentially turn off the instrument
/// </summary>
public abstract void Shutdown();
}
}

View File

@@ -0,0 +1,146 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
/// <summary>
/// InstrumentException - an exception that can be thrown by all instruments
/// while processing any instruction
/// <remarks>can be used as a base class</remarks>
/// </summary>
[DataContract]
public class InstrumentException : Exception
{
[DataMember]
private string _message = string.Empty;
[DataMember]
private int _errorCode = 0;
/// <summary>
/// Message - readable information associated with the exception
/// </summary>
public override string Message
{
get
{
return _message;
}
}
/// <summary>
/// ErrorCode - code associated with error involved with this exception
/// </summary>
public int ErrorCode
{
get { return _errorCode; }
set { _errorCode = value; }
}
/// <summary>
/// InstrumentException - default constructor
/// </summary>
public InstrumentException()
: base()
{
}
/// <summary>
/// InstrumentException - constructor with a message as parameter
/// </summary>
/// <param name="message">message about the exception</param>
public InstrumentException(string message)
: base()
{
_message = message;
}
/// <summary>
/// InstrumentException - constructor that takes an error code
/// </summary>
/// <param name="errorCode">the error code</param>
public InstrumentException(int errorCode)
: base()
{
_errorCode = errorCode;
}
/// <summary>
/// InstrumentException - constructor that takes an error code and message
/// </summary>
/// <param name="errorCode">the error code</param>
/// <param name="message">the message</param>
public InstrumentException(int errorCode, string message)
: base()
{
_message = message;
_errorCode = errorCode;
}
/// <summary>
/// InstrumentException - constructor that takes an error message and inner exception
/// </summary>
/// <param name="message">the message</param>
/// <param name="innerException">an inner exception</param>
public InstrumentException(string message, Exception innerException)
: base(message, innerException)
{
_message = message;
}
/// <summary>
/// InstrumentException - protected constructor
/// </summary>
/// <param name="info">serialization info</param>
/// <param name="context">context</param>
protected InstrumentException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// GetObjectData - override for serialization
/// </summary>
/// <param name="info">how to serialize</param>
/// <param name="context">context</param>
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
}

View File

@@ -0,0 +1,65 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.ComponentModel.Composition;
namespace Raytheon.Instruments
{
/// <summary>
/// ExportInstrumentFactoryAttribute - attribute to allow MEF to figure all the factories out
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ExportInstrumentFactoryAttribute : ExportAttribute, IInstrumentFactoryInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ExportInstrumentFactoryAttribute"/> class.
/// </summary>
public ExportInstrumentFactoryAttribute()
: base(typeof(IInstrumentFactory))
{
}
/// <summary>
/// Gets or sets the model number.
/// </summary>
/// <value>
/// The model number.
/// </value>
public string ModelNumber { get; set; }
}
}

View File

@@ -0,0 +1,55 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.ComponentModel.Composition;
using System.Diagnostics.CodeAnalysis;
namespace Raytheon.Instruments
{
/// <summary>
/// InstrumentMetadata - any instrument information not needed for running
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class InstrumentMetadata : ExportAttribute
{
/// <summary>
/// ModelNumber - the model number for the instrument
/// </summary>
public string ModelNumber { get; set; }
}
}

View File

@@ -0,0 +1,161 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Communication;
using Raytheon.Communication.Rpc;
using System.Globalization;
namespace Raytheon.Instruments
{
/// <summary>
/// Generic (and abstract) proxy factory for helping to do all of the work that needs to
/// be done in proxy factories. All that needs implementation is the GetSupportedInterfaces
/// method, this will be up to the impl
///
/// What shall be done is a proxy factory for every interface should be declared in
/// a dll. Then a consumer would import via MEF all the factories and use them appropriately
/// </summary>
public abstract class InstrumentProxyFactory<T> : IInstrumentProxyFactory
where T : class
{
#region Private Fields
//as of right now these do not appear to need access to the implementing class
private IUms _UmsHost;
private IUmsClientFactory _UmsClientFactory;
//Added a GetProxy method for access to a specific proxy
private Dictionary<string, IUmsClient<T>> _Proxies;
#endregion
#region IInstrumentProxyFactory Members
/// <summary>
/// This must be called to initialize a factory with a media port to create the client
/// </summary>
/// <param name="umsHost">host for the client factory to use to create the proxy</param>
/// <param name="umsClientFactory">client factory to use to create proxies</param>
public virtual void Initialize(IUms umsHost, IUmsClientFactory umsClientFactory)
{
_Proxies = new Dictionary<string, IUmsClient<T>>();
_UmsClientFactory = umsClientFactory;
_UmsHost = umsHost;
}
/// <summary>
/// This is the call any client rpc instrument manager would use to get the proxy
/// it will return the specific instrument proxy which can be cast to a generic
/// IInstrument if needed, the only way to cast to a derived type is to return one
/// in the first place since they are proxies
/// </summary>
/// <param name="name">instrument name</param>
/// <returns>the Type proxy (not the IInstrument)</returns>
public virtual IInstrument GetInstrument(string name)
{
return GetSpecificInstrument(name) as IInstrument;
}
/// <summary>
/// Implementing class must provide the interfaces it supports
/// Since this is purely an interface driven proxy the acutal implementation
/// under the hood of the Interfaces matters not
/// </summary>
/// <returns>collection of interfaces it can create proxies to</returns>
public abstract ICollection<string> GetSupportedInterfaces();
#endregion
#region Protected Methods
/// <summary>
/// returns the specific instruments proxy, this is a generic operation so put into abstract class
/// </summary>
/// <param name="name">instrument name</param>
/// <returns>the specific instruments proxy</returns>
protected virtual T GetSpecificInstrument(string name)
{
if (null == _Proxies)
{
string message = typeof(T).FullName + " Factory not initialized, proxy container not created";
throw new InstrumentException(message);
}
if (!_Proxies.ContainsKey(name))
{
var proxy = CreateProxy(name);
_Proxies.Add(name, proxy);
}
return _Proxies[name].Contract;
}
/// <summary>
/// added to allow an implementing class to get access to proxies so that it may add properties or
/// whatever else needs to be done to the objects
/// </summary>
/// <param name="proxyName">instrument name</param>
/// <returns>the proxy to that specific instrument</returns>
protected IUmsClient<T> GetProxy(string proxyName)
{
IUmsClient<T> proxy = null;
_Proxies.TryGetValue(proxyName, out proxy);
return proxy;
}
/// <summary>
/// creates the proxy, this is a generic operation, so put into the abstract class
/// </summary>
/// <param name="proxyName">instrument name</param>
/// <returns>the proxy to the given instrument</returns>
protected virtual IUmsClient<T> CreateProxy(string proxyName)
{
if (null == _UmsClientFactory || null == _UmsHost)
{
string message = typeof(T).FullName + " Factory not initialized, ums information is null";
throw new InstrumentException(message);
}
IUmsClient<T> proxy = _UmsClientFactory.GetClient<T>(_UmsHost);
proxy.AddProperty("instName", proxyName);
proxy.Open();
return proxy;
}
#endregion
}
}

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AssemblyName>Raytheon.Instruments.Contracts</AssemblyName>
<Product>Raytheon Configuration</Product>
<Description>Base Instrument interface and export attribute</Description>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.6.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Communication.Rpc.Contracts" Version="1.8.1.13" />
<PackageReference Include="Raytheon.Communication.Ums.Core.Contracts" Version="1.1.2.1" />
<PackageReference Include="Raytheon.Communication.Ums.Rpc.Attributes" Version="1.0.4.1" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,63 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Runtime.Serialization;
namespace Raytheon.Instruments
{
/// <summary>
/// SelfTestResult - an enumeration for passing, failing or unknown state
/// of a self test.
/// </summary>
[DataContract]
public enum SelfTestResult
{
/// <summary>
/// SelfTestResult.Unknown - this indicates it is unknown what the self test result
/// is currently.
/// </summary>
[EnumMember]
Unknown,
/// <summary>
/// SelfTestResult.Pass - last time the self test was run, it passed.
/// </summary>
[EnumMember]
Pass,
/// <summary>
/// SelfTestResult.Fail - last time teh self test was run, it failed.
/// </summary>
[EnumMember]
Fail,
}
}

View File

@@ -0,0 +1,88 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
/// <summary>
/// State - enumeration for the states a instrument could be in
/// </summary>
[DataContract]
public enum State
{
/// <summary>
/// State.Ready - the up and running waiting on instructions
/// </summary>
[EnumMember]
Ready,
/// <summary>
/// State.Busy - the instrument cannot be tasked it is already processing
/// some command or instruction that cannot be interrupted
/// </summary>
[EnumMember]
Busy,
/// <summary>
/// State.CommunicationFailure - the instrument is in error right now and the
/// software component has lost connection with
/// the instrument
/// </summary>
[EnumMember]
CommunicationFailure,
/// <summary>
/// State.HardwareFailure - the hardware has failed and cannot recover from some
/// error
/// </summary>
[EnumMember]
HardwareFailure,
/// <summary>
/// State.InternalError - driver error internal to the software
/// </summary>
[EnumMember]
InternalError,
/// <summary>
/// State.Uninitialized - an unknown state as the instrument must be initialized to
/// understand it's current state.
/// </summary>
[EnumMember]
Uninitialized,
}
}

View File

@@ -0,0 +1,11 @@
// 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.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]

View File

@@ -0,0 +1,158 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Communication;
using System.Diagnostics.CodeAnalysis;
namespace Raytheon.Instruments
{
/// <summary>
/// Instrument manager interface.
/// </summary>
/// <remarks>
/// An instrument manager is responsible for loading all of the instrument plugins and providing an interface for retrieving those instruments.
/// </remarks>
[UmsContract]
public interface IInstrumentManager
{
/// <summary>
/// Gets an instrument by name.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>The instrument</returns>
/// <remarks>This function cannot be named the same as the Generic method GetInstrument/<T/>
/// because certain test executives do not support generics, and will throw an AmbiguousMatchException.</remarks>
IInstrument GetGenericInstrument(string name);
/// <summary>
/// Gets an instrument by name.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>The instrument</returns>
T GetInstrument<T>(string name) where T : class;
/// <summary>
/// Gets all instruments currently loaded.
/// </summary>
/// <returns>collection of all known instruments</returns>
ICollection<object> GetInstruments();
/// <summary>
/// Gets all instruments currently loaded.
/// </summary>
/// <returns>array of all known instruments</returns>
[UmsCommand("IInstrumentManager.GetInstrumentsArray")]
object[] GetInstrumentsArray();
/// <summary>
/// Gets the instruments of the given type.
/// </summary>
/// <param name="type">The type.</param>
/// <returns>all known instruments of a certain type</returns>
ICollection<object> GetInstruments(Type type);
/// <summary>
/// Gets the instruments of the given type.
/// </summary>
/// <param name="type">The type.</param>
/// <returns>array of instruments of the specified type</returns>
object[] GetInstrumentsArray(Type type);
/// <summary>
/// Initializes the instrument manager
/// </summary>
[UmsCommand("IInstrumentManager.Initialize")]
void Initialize();
/// <summary>
/// Sets/Gets the part location
/// Added Dec 2013 to better clarify where the part locations are loading from
/// and to be able to set it before initialization
/// </summary>
string _partsLocation
{
get;
set;
}
/// <summary>
/// Closes the instrument manager
/// </summary>
void Shutdown();
/// <summary>
/// Returns a collection of instrument names loaded.
/// </summary>
/// <returns>all the known instrument's unique name</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
[UmsCommand("IInstrumentManager.GetInstrumentNames")]
ICollection<string> GetInstrumentNames();
/// <summary>
/// Returns a collection of instrument names loaded.
/// </summary>
/// <returns>all the known instrument names in array form</returns>
[UmsCommand("IInstrumentManager.GetInstrumentNamesArray")]
string[] GetInstrumentNamesArray();
/// <summary>
/// Initializes all of the instruments.
/// </summary>
[UmsCommand("IInstrumentManager.InitializeInstruments")]
void InitializeInstruments();
/// <summary>
/// Initializes the instrument.
/// </summary>
/// <param name="instName">Name of the inst.</param>
[UmsCommand("IInstrumentManager.InitializeInstrument")]
void InitializeInstrument(string instName);
/// <summary>
/// Shuts down all of the instruments.
/// </summary>
[UmsCommand("IInstrumentManager.ShutdownInstruments")]
void ShutdownInstruments();
/// <summary>
/// Shutdowns the instrument.
/// </summary>
/// <param name="instName">Name of the inst.</param>
[UmsCommand("IInstrumentManager.ShutdownInstrument")]
void ShutdownInstrument(string instName);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AssemblyName>Raytheon.Instruments.InstrumentManager.Contracts</AssemblyName>
<Product>Raytheon Configuration</Product>
<Description>Instrument Manager Interface</Description>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.8.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.6.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,133 @@
// **********************************************************************************************************
// BitTestResult.cs
// 6/21/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using System.Runtime.Serialization;
using System;
namespace Raytheon.Instruments
{
[Serializable]
[DataContract]
public class BitTestResult
{
[DataMember]
public string FieldArrayValue { get; set; }
[DataMember]
public string FieldBitValue { get; set; }
[DataMember]
public string FieldDefaultValue { get; set; }
[DataMember]
public string FieldInstruType { get; set; }
[DataMember]
public string FieldMaxValue { get; set; }
[DataMember]
public string FieldMinValue { get; set; }
[DataMember]
public string FieldName { get; set; }
[DataMember]
public string FieldType { get; set; }
[DataMember]
public string FieldValue { get; set; }
[DataMember]
public string Variable { get; set; }
[DataMember]
public string MaxOffset { get; set; }
[DataMember]
public string MinOffset { get; set; }
[DataMember]
public string VerifyType { get; set; }
[DataMember]
public bool IsSelected { get; set; }
[DataMember]
public bool IsArray { get; set; }
[DataMember]
public bool IsStructure { get; set; }
[DataMember]
public bool IsArrayOfStructures { get; set; }
[DataMember]
public bool IsEnum { get; set; }
[DataMember]
public bool UsesRegister { get; set; }
[DataMember]
public bool IsValid { get; set; }
[DataMember]
public bool UseRange { get; set; }
[DataMember]
public int ArrayLength { get; set; }
[DataMember]
public uint ImageWidth { get; set; }
[DataMember]
public uint ImageHeight { get; set; }
[DataMember]
public uint ImagePixelSize { get; set; }
[DataMember]
public ulong BitMask { get; set; }
[DataMember]
public bool Expanded { get; set; }
[DataMember]
public int Depth { get; set; }
[DataMember]
public byte[ ] ImageBuffer { get; set; }
[DataMember]
public uint ImageBufferSize { get; set; }
}
}

View File

@@ -0,0 +1,62 @@
// **********************************************************************************************************
// BitTestResults.cs
// 6/30/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
[Serializable]
[DataContract]
public class BitTestResults
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string Label { get; set; }
[DataMember]
public DateTime Time { get; set; }
[DataMember]
public IList<BitTestResult> Results { get; set; }
public BitTestResult GetResult( string fieldName )
{
return Results.FirstOrDefault( f => f.FieldName == fieldName );
}
}
}

View File

@@ -0,0 +1,54 @@
// **********************************************************************************************************
// BitNotConnectedException.cs
// 7/21/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using System;
namespace Raytheon.Instruments.Exceptions
{
public class BitNotConnectedException : Exception
{
public BitNotConnectedException()
: base("BIT Not Connected, please check your settings")
{
}
public BitNotConnectedException(string message)
: base($"BIT Not Connected, {message}")
{
}
public BitNotConnectedException(string message, Exception innerException)
: base($"BIT Not Connected, {message}", innerException)
{
}
}
}

View File

@@ -0,0 +1,54 @@
// **********************************************************************************************************
// BitParseException.cs
// 7/21/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using System;
namespace Raytheon.Instruments.Exceptions
{
public class BitParseException : Exception
{
public BitParseException()
: base("BIT Message Parsing Error, please check your settings")
{
}
public BitParseException(string message)
: base($"BIT Message Parsing Error, {message}")
{
}
public BitParseException(string message, Exception innerException)
: base($"BIT Message Parsing Error, {message}", innerException)
{
}
}
}

View File

@@ -0,0 +1,54 @@
// **********************************************************************************************************
// BitTimeoutException.cs
// 7/21/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using System;
namespace Raytheon.Instruments.Exceptions
{
public class BitTimeoutException : Exception
{
public BitTimeoutException()
: base("BIT Timed Out, please check your settings")
{
}
public BitTimeoutException(string message)
: base($"BIT Timed Out, {message}")
{
}
public BitTimeoutException(string message, Exception innerException)
: base($"BIT Timed Out, {message}", innerException)
{
}
}
}

View File

@@ -0,0 +1,84 @@
// **********************************************************************************************************
// IBit.cs
// 6/21/2022
// NGI - Next Generation Interceptor
//
// Contract No. HQ0856-21-C-0003/1022000209
//
// THIS DOCUMENT DOES NOT CONTAIN TECHNOLOGY OR TECHNICAL DATA CONTROLLED UNDER EITHER THE U.S.
// INTERNATIONAL TRAFFIC IN ARMS REGULATIONS OR THE U.S. EXPORT ADMINISTRATION REGULATIONS.
//
// 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.
//
// UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
// DESTRUCTION NOTICE: FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN DOD 5220.22-M,
// NATIONAL INDUSTRIAL SECURITY PROGRAM OPERATING MANUAL, FEBRUARY 2006,
// INCORPORATING CHANGE 1, MARCH 28, 2013, CHAPTER 5, SECTION 7, OR DODM 5200.01-VOLUME 3,
// DOD INFORMATION SECURITY PROGRAM: PROTECTION OF CLASSIFIED INFORMATION, ENCLOSURE 3,
// SECTION 17. FOR CONTROLLED UNCLASSIFIED INFORMATION FOLLOW THE PROCEDURES IN DODM 5200.01-VOLUME 4,
// INFORMATION SECURITY PROGRAM: CONTROLLED UNCLASSIFIED INFORMATION.
//
// CONTROLLED BY: MISSILE DEFENSE AGENCY
// CONTROLLED BY: GROUND-BASED MIDCOURSE DEFENSE PROGRAM OFFICE
// CUI CATEGORY: CTI
// DISTRIBUTION/DISSEMINATION CONTROL: F
// POC: Alex Kravchenko (1118268)
// **********************************************************************************************************
using Raytheon.Communication;
using System.Collections.Generic;
namespace Raytheon.Instruments
{
[UmsContract]
public interface IBit : IInstrument
{
/// <summary>
/// Open the communication interface
/// </summary>
[UmsCommand( "IBit.Open" )]
void Open( );
/// <summary>
/// Close the communication interface
/// </summary>
[UmsCommand( "IBit.Close" )]
void Close( );
/// <summary>
/// Starts execution of the Built In Test
/// </summary>
/// <param name="messageId">could be either a label or message name</param>
/// <param name="timeoutInMs">how log to wait in milliseconds</param>
/// <param name="messageParams"></param>
/// <returns></returns>
[UmsCommand( "IBit.RunBIT" )]
bool RunBIT( string messageId, uint timeoutInMs, IEnumerable<KeyValuePair<string, string>> messageParams );
/// <summary>
/// Starts execution of the Built In Test and waits for result
/// </summary>
/// <param name="messageIdOut">could be either a label or message name</param>
/// <param name="messageIdIn">could be either a label or message name</param>
/// <param name="timeoutInMs">how log to wait in milliseconds</param>
/// <param name="messageParams"></param>
/// <returns></returns>
[UmsCommand( "IBit.RunBITWaitForResults" )]
BitTestResults RunBITWaitForResults( string messageIdOut, string messageIdIn, uint timeoutInMs, IEnumerable<KeyValuePair<string, string>> messageParams );
/// <summary>
/// Retrieve resutls from previously started test
/// </summary>
/// <param name="messageId">could be either a label or message name</param>
/// <returns></returns>
[UmsCommand( "IBit.GetBITResults" )]
BitTestResults GetBITResults( string messageId );
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.BIT.Contracts</AssemblyName>
<Description>nterface definition for Built In Test (BIT)</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.4.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,62 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using Raytheon.Communication;
using System;
namespace Raytheon.Instruments
{
/// <summary>
/// This interfaces defines the API for a chiller system
/// </summary>
[UmsContract]
public interface IChiller : IInstrument
{
/// <summary>
///
/// </summary>
[UmsCommand("IChiller.DisableFlow")]
void DisableFlow();
/// <summary>
///
/// </summary>
[UmsCommand("IChiller.EnableFlow")]
void EnableFlow();
/// <summary>
///
/// </summary>
/// <returns></returns>
[UmsCommand("IChiller.GetCoolantSetpoint")]
double GetCoolantSetpoint();
/// <summary>
///
/// </summary>
/// <returns></returns>
[UmsCommand("IChiller.GetCoolantTemperature")]
double GetCoolantTemperature();
/// <summary>
///
/// </summary>
/// <param name="temp"></param>
[UmsCommand("IChiller.SetCoolantTemperature")]
void SetCoolantTemperature(double temp);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.Chiller.Contracts</AssemblyName>
<Description>IChiller Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.3.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,114 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Threading;
using System.Threading.Tasks;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface to any device that you can write and read to/from
/// </summary>
public interface ICommAsync : IInstrument
{
/// <summary>
/// Close the communication interface
/// </summary>
void Close( );
/// <summary>
/// Open the communication interface
/// </summary>
void Open( );
/// <summary>
/// Set the timeout on a read
/// </summary>
/// <param name="timeout"></param>
void SetReadTimeout( uint timeout );
/// <summary>
/// Reads data from a communication device
/// </summary>
/// <param name="dataRead"></param>
/// <param name="token"></param>
/// <returns>number of bytes read</returns>
Task<uint> ReadAsync(byte[] dataRead, CancellationToken token = default(CancellationToken));
/// <summary>
/// Reads data from a communication device
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
Task<string> ReadAsync(CancellationToken token = default(CancellationToken));
/// <summary>
/// Writes data to a communication device
/// </summary>
/// <param name="data"></param>
/// <param name="numBytesToWrite"></param>
/// <returns>the number of bytes written</returns>
Task<uint> WriteAsync(byte[] dataToSend, uint numBytesToWrite, CancellationToken token = default(CancellationToken));
/// <summary>
/// Writes data to a communication device
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
Task WriteAsync(string message, CancellationToken token = default(CancellationToken));
/// <summary>
/// Send command and get response
/// </summary>
Task<string> SendCommandGetResponseAsync(string message, CancellationToken token = default(CancellationToken), int timeoutInMs = 5000);
/// <summary>
/// Send command and get response
/// </summary>
Task<byte[]> SendCommandGetResponseAsync(byte[] data, CancellationToken token = default(CancellationToken), int timeoutInMs = 5000);
/// <summary>
/// Keep reading asynchronously
/// </summary>
/// <param name="cancellationToken"></param>
/// <param name="dataReceived"></param>
/// <returns></returns>
Task KeepReadingAsync( CancellationToken cancellationToken, Action<string> dataReceived );
/// <summary>
/// Keep reading asynchronously
/// </summary>
Task KeepReadingAsync(CancellationToken cancellationToken, Action<byte[]> dataReceived);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.CommAsync.Contracts</AssemblyName>
<Description>ICommAsync Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.4.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,79 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface to any device that you can write and read to/from
/// </summary>
public interface ICommDevice : IInstrument
{
/// <summary>
/// Close the communication interface
/// </summary>
[UmsCommand("ICommDevice.Close")]
void Close();
/// <summary>
/// Open the communication interface
/// </summary>
[UmsCommand("ICommDevice.Open")]
void Open();
/// <summary>
/// Reads data from a communication device
/// </summary>
/// <param name="dataRead"></param>
/// <returns>number of bytes read</returns>
[UmsCommand("ICommDevice.Read")]
uint Read(ref byte[] dataRead);
/// <summary>
/// Set the timeout on a read
/// </summary>
/// <param name="timeout"></param>
[UmsCommand("ICommDevice.SetReadTimeout")]
void SetReadTimeout(uint timeout);
/// <summary>
/// Writes data to a communication device
/// </summary>
/// <param name="data"></param>
/// <param name="numBytesToWrite"></param>
/// <returns>the number of bytes written</returns>
[UmsCommand("ICommDevice.Write")]
uint Write(byte[] data, uint numBytesToWrite);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.CommDevice.Contracts</AssemblyName>
<Description>ICommDevice Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.2.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,188 @@
// *******************************************************************************************
// ** **
// ** DCPwrSentry.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.Communication;
namespace Raytheon.Instruments
{
/// <summary>
/// SHUTS DOWN ALL SUPPLIES WHEN AN OVER CURRENT OR VOLTAGE OCCURS
/// This interface will define instruments that watch DCPwr supplies
/// and monitor their over current and voltage limits, when one of the power supplies
/// trips, the others will be shutdown.
/// </summary>
[UmsContract]
public sealed class DCPwrSentry
{
#region Private Fields
private HashSet<IDCPwr> _Supplies = new HashSet<IDCPwr>();
private volatile object _SupplyLock = new object();
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="DCPwrSentry"/> class.
/// </summary>
public DCPwrSentry()
{
}
#endregion
#region Public Methods
/// <summary>
/// Adds the specified supply to monitor and be shut down if the
/// other supplies over current or over voltage
/// </summary>
/// <param name="supply">The supply.</param>
[UmsCommand("IDCPwrSentry.Add")]
public void Add(IDCPwr supply)
{
if (null != supply && !_Supplies.Contains(supply))
{
lock (_SupplyLock)
{
_Supplies.Add(supply);
supply.OverCurrent += new EventHandler<OverCurrentEventArgs>(supply_OverCurrent);
supply.OverVoltage += new EventHandler<OverVoltageEventArgs>(supply_OverVoltage);
}
}
}
/// <summary>
/// Removes the specified supply to monitor and be shut down if the
/// other supplies over current or over voltage
/// </summary>
/// <param name="supply">The supply.</param>
[UmsCommand("IDCPwrSentry.Remove")]
public void Remove(IDCPwr supply)
{
if (null != supply && _Supplies.Contains(supply))
{
lock (_SupplyLock)
{
_Supplies.Remove(supply);
supply.OverVoltage -= this.supply_OverVoltage;
supply.OverCurrent -= this.supply_OverCurrent;
}
}
}
#endregion
#region Public Events
/// <summary>
/// Occurs when any of the supplies over current.
/// </summary>
[UmsEvent("IDCPwrSentry.OverCurrent")]
public event EventHandler<OverCurrentEventArgs> OverCurrent;
/// <summary>
/// Occurs when any of the supplies over voltage.
/// </summary>
[UmsEvent("IDCPwrSentry.OverVoltage")]
public event EventHandler<OverVoltageEventArgs> OverVoltage;
#endregion
#region Private Event Handlers From Supplies
private void supply_OverCurrent(object sender, OverCurrentEventArgs e)
{
//lock our supply list, no changing mid event handling
lock (_SupplyLock)
{
//turn off all supplies
ShutdownSupplies();
//notify listeners
if (null != OverCurrent)
{
OverCurrent(this, new OverCurrentEventArgs(_Supplies));
}
}
}
private void supply_OverVoltage(object sender, OverVoltageEventArgs e)
{
//lock our supply list, no changing mid event handling
lock (_SupplyLock)
{
//turn off all supplies
ShutdownSupplies();
//notify listeners
if (null != OverVoltage)
{
OverVoltage(this, new OverVoltageEventArgs(_Supplies));
}
}
}
private void ShutdownSupplies()
{
//lock our supply list, no changing mid event handling
lock (_SupplyLock)
{
//turn off all supplies
foreach (var supply in _Supplies)
{
try
{
supply.Enabled = false;
}
catch (InstrumentException)
{
//catch the instrument exceptions on the supplies we are
//trying to shut down that have over current or voltaged
}
}
}
}
#endregion
}
}

View File

@@ -0,0 +1,206 @@
// *******************************************************************************************
// ** **
// ** IDCPwr.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 Raytheon.Communication;
using Raytheon.Units;
namespace Raytheon.Instruments
{
/// <summary>
/// IDCPwr - simple dc power supply interface
/// </summary>
[UmsContract]
public interface IDCPwr : IInstrument
{
/// <summary>
/// Gets or sets the current limit.
/// </summary>
/// <value>
/// The current limit.
/// </value>
Current CurrentLimit
{
[UmsCommand("IDCPwr.GetCurrentLimit")]
get;
[UmsCommand("IDCPwr.SetCurrentLimit")]
set;
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="IDCPwr"/> is enabled.
/// </summary>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
bool Enabled
{
[UmsCommand("IDCPwr.GetEnabled")]
get;
[UmsCommand("IDCPwr.SetEnabled")]
set;
}
/// <summary>
/// Measures the current.
/// </summary>
/// <returns>current within <see cref="Current"/></returns>
[UmsCommand("IDCPwr.MeasureCurrent")]
Current MeasureCurrent();
/// <summary>
/// Measures the voltage.
/// </summary>
/// <returns>voltage within <see cref="Voltage"/></returns>
[UmsCommand("IDCPwr.MeasureVoltage")]
Voltage MeasureVoltage();
/// <summary>
/// Gets or sets the output voltage.
/// </summary>
/// <value>
/// The output voltage within <see cref="Voltage"/>
/// </value>
Voltage OutputVoltage
{
[UmsCommand("IDCPwr.GetOutputVoltage")]
get;
[UmsCommand("IDCPwr.SetOutputVoltage")]
set;
}
/// <summary>
/// Gets or sets the over voltage protection.
/// </summary>
/// <value>
/// The over voltage protection within <see cref="Voltage"/>
/// </value>
Voltage OverVoltageProtection
{
[UmsCommand("IDCPwr.GetOverVoltageProtection")]
get;
[UmsCommand("IDCPwr.SetOverVoltageProtection")]
set;
}
/// <summary>
/// Gets or sets a value indicating whether [over voltage protection enabled].
/// </summary>
/// <value>
/// <c>true</c> if [over voltage protection enabled]; otherwise, <c>false</c>.
/// </value>
bool OverVoltageProtectionEnabled
{
[UmsCommand("IDCPwr.GetOverVoltageProtectionEnabled")]
get;
[UmsCommand("IDCPwr.SetOverVoltageProtectionEnabled")]
set;
}
/// <summary>
/// Gets or sets the voltage soft limit.
/// </summary>
/// <value>
/// The voltage soft limit within <see cref="Voltage"/>
/// </value>
Voltage VoltageSoftLimit
{
[UmsCommand("IDCPwr.GetVoltageSoftLimit")]
get;
[UmsCommand("IDCPwr.SetVoltageSoftLimit")]
set;
}
/// <summary>
/// Gets or sets a value indicating whether the power supplies inhibit is enabled.
/// </summary>
/// <value>
/// <c>true</c> if [inhibit enabled]; otherwise, <c>false</c>.
/// </value>
bool InhibitEnabled
{
[UmsCommand("IDCPwr.GetInhibitEnabled")]
get;
[UmsCommand("IDCPwr.SetInhibitEnabled")]
set;
}
/// <summary>
/// Occurs when the supply over currents.
/// </summary>
[UmsEvent("IDCPwr.OverCurrent")]
event EventHandler<OverCurrentEventArgs> OverCurrent;
/// <summary>
/// Occurs when the supply over voltages.
/// </summary>
[UmsEvent("IDCPwr.OverVoltage")]
event EventHandler<OverVoltageEventArgs> OverVoltage;
/// <summary>
/// reads protection status (fault register) of the power supply
/// </summary>
/// <returns></returns>
[UmsCommand("IDCPwr.ReadProtectionStatus")]
int ReadProtectionStatus();
/// <summary>
/// Control the power supply internal mechanical relay state
/// </summary>
/// <param name="shallWeConnect">True to connect, false to disconnect</param>
[UmsCommand( "IDCPwr.MechanicalRelayOutputControl" )]
void MechanicalRelayOutputControl(bool shallWeConnect);
//*** possible future enhancements
//SetVoltageTriggerSource(…);
//SetVoltageTriggerLevels(…);
//InitiateVoltageTrigger();
//TriggerVoltage();
//SetMeasurementTriggerSource(…);
//InitiateMeasurementTrigger(…);
//TriggerMeasurement();
//AbortMeasurement();
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.DCPwr.Contracts</AssemblyName>
<Description>IDCPwr Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>2.7.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,77 @@
// *******************************************************************************************
// ** **
// ** OverCurrentEventArgs.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.Collections.ObjectModel;
using Raytheon.Communication;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
/// <summary>
/// Over current event notifier
/// </summary>
[Serializable]
[DataContract]
public class OverCurrentEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="OverCurrentEventArgs"/> class.
/// with the affected power supplies
/// </summary>
public OverCurrentEventArgs(ICollection<IDCPwr> supplies)
{
List<String> namedSupplies = new List<string>();
if (null != supplies)
{
foreach (var sup in supplies)
{
namedSupplies.Add(sup.Name);
}
}
Supplies = new ReadOnlyCollection<string>(namedSupplies);
}
/// <summary>
/// Gets the affected power supplies.
/// </summary>
[DataMember(Order = 0, Name = "Supplies")]
public ReadOnlyCollection<String> Supplies { get; private set; }
}
}

View File

@@ -0,0 +1,78 @@
// *******************************************************************************************
// ** **
// ** OverVoltageEventArgs.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.Collections.ObjectModel;
using Raytheon.Communication;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
/// <summary>
/// Over voltage event notifier
/// </summary>
[Serializable]
[DataContract]
public class OverVoltageEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="OverVoltageEventArgs"/> class.
/// with the affected power supplies
/// </summary>
public OverVoltageEventArgs(ICollection<IDCPwr> supplies)
{
List<String> namedSupplies = new List<string>();
if (null != supplies)
{
foreach (var sup in supplies)
{
namedSupplies.Add(sup.Name);
}
}
Supplies = new ReadOnlyCollection<string>(namedSupplies);
}
/// <summary>
/// Gets the supplies that are affected
/// </summary>
[DataMember(Order = 0, Name = "Supplies")]
public ReadOnlyCollection<String> Supplies { get; private set; }
}
}

View 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

View File

@@ -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>

View 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>

View 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
}
}

View 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")]

View 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;
}
}
}

View 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>

View File

@@ -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
}
}

View File

@@ -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
}
}

View 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,
}
}

View 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
}
}

View File

@@ -0,0 +1,15 @@
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
[DataContract]
public enum EloadModuleMode
{
[EnumMember]
RESISTANCE,
[EnumMember]
VOLTAGE,
[EnumMember]
CURRENT
}
}

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.ELoad.Contracts</AssemblyName>
<Description>IELoad Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.1.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>

View File

@@ -0,0 +1,155 @@
//###########################################################################//
// 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.
//
// 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.
//
// DOD 5220.22-M, INDUSTRIAL SECURITY MANUAL, CHAPTER 5, SECTION 1 THROUGH 9 :
// FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN OR DOD 5200.1-R,
// INFORMATION SECURITY PROGRAM, CHAPTER 6. FOR UNCLASSIFIED, LIMITED DOCUMENTS
// DESTROY BY ANY METHOD THAT WILL PREVENT DISCLOSURE OF CONTENTS OR
// RECONSTRUCTION OF THE DOCUMENT.
//############################################################################//
using Raytheon.Communication;
using Raytheon.Units;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface for all Eload classes to implement.
/// </summary>
[UmsContract]
public interface IEload : IInstrument
{
/// <summary>
/// Turn off the Eload module.
/// </summary>
[UmsCommand( "IEload.Disable" )]
void Disable( );
/// <summary>
/// Turn on the Eload module.
/// </summary>
[UmsCommand( "IEload.Enable" )]
void Enable( );
/// <summary>
/// Queries IO with command
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
[UmsCommand( "IEload.IOQuery" )]
string IOQuery( string command );
/// <summary>
/// Writes IO
/// </summary>
/// <param name="command"></param>
[UmsCommand( "IEload.IOWrite" )]
void IOWrite( string command );
/// <summary>
/// Query if the Eload module input is on.
/// </summary>
/// <returns>Status of Eload. True = On, False = Off.</returns>
[UmsCommand( "IEload.IsInputOn" )]
bool IsInputOn( );
/// <summary>
/// Reads the current of the Eload module.
/// </summary>
/// <returns>The current (Amps)</returns>
[UmsCommand( "IEload.ReadCurrent" )]
Current ReadCurrent( );
/// <summary>
/// Reads the mode of the Eload module.
/// </summary>
/// <returns>The mode.</returns>
[UmsCommand( "IEload.ReadMode" )]
EloadModuleMode ReadMode( );
/// <summary>
/// Reads the overcurrent setting from an Eload module.
/// </summary>
/// <returns>The current (Amps).</returns>
[UmsCommand( "IEload.ReadOverCurrentProtection" )]
Current ReadOverCurrentProtection( );
/// <summary>
/// Reads the overvoltage setting from an Eload module.
/// </summary>
/// <returns>The voltage (Volts).</returns>
[UmsCommand( "IEload.ReadOverVoltageProtection" )]
Voltage ReadOverVoltageProtection( );
/// <summary>
/// Query the Eload module for the resistance.
/// </summary>
/// <returns>The resistance (Ohms).</returns>
[UmsCommand( "IEload.ReadResistance" )]
Resistance ReadResistance( );
/// <summary>
/// Queries the Eload module for the setpoint value. Depends on operation mode.
/// </summary>
/// <returns>The setpoint value.</returns>
[UmsCommand( "IEload.ReadSetpoint" )]
double ReadSetpoint( );
/// <summary>
/// Query the Eload module for the voltage.
/// </summary>
/// <returns>The voltage (Volts).</returns>
[UmsCommand( "IEload.ReadVoltage" )]
Voltage ReadVoltage( );
/// <summary>
/// Reads the protection status from an Eload module.
/// </summary>
/// <returns>The protection status register</returns>
[UmsCommand( "IEload.ReadProtectionStatus" )]
ushort ReadProtectionStatus( );
/// <summary>
/// Resets the Eload setpoint and mode to config file values
/// </summary>
[UmsCommand( "IEload.SetInitialSetting" )]
void SetInitialSetting( );
/// <summary>
/// Change the mode for the Eload module.
/// </summary>
/// <param name="mode">The desired Eload module mode.</param>
[UmsCommand( "IEload.SetMode" )]
void SetMode( EloadModuleMode mode );
/// <summary>
/// Change the setpoint and operation mode of the Eload module.
/// </summary>
/// <param name="newSetpoint">The new setpoint.</param>
/// <param name="mode">The new mode.</param>
[UmsCommand( "IELoad.SetSetpoint" )]
void SetSetpoint( double newSetpoint, EloadModuleMode mode );
}
}

View File

@@ -0,0 +1,100 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using Raytheon.Communication;
using Raytheon.Units;
using System.Collections.Generic;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface for power supplies to implement.
/// </summary>
[UmsContract]
public interface IELoadSystem : IInstrument
{
[UmsCommand("IELoadSystem.AddEloadChannel")]
void AddEloadChannel(string name, int channelNumber, EloadModuleMode mode, double setpoint, Current overCurrentProtection, Voltage overVoltageProtection);
[UmsCommand("IELoadSystem.GetErrorCode")]
string GetErrorCode(out int errorCode);
[UmsCommand("IELoadSystem.GetModuleNames")]
List<string> GetModuleNames();
[UmsCommand("IELoadSystem.GetSystemName")]
string GetSystemName();
[UmsCommand( "IELoadSystem.IOQuery" )]
string IOQuery( string channelName, string command );
[UmsCommand( "IELoadSystem.IOWrite" )]
void IOWrite( string channelName, string command );
[UmsCommand("IELoadSystem.IsInputOn")]
bool IsInputOn(string channelName);
[UmsCommand("IELoadSystem.Enable")]
void Enable(string channelName);
[UmsCommand("IELoadSystem.Disable")]
void Disable(string channelName);
[UmsCommand("IELoadSystem.ReadCurrent")]
Current ReadCurrent(string channelName);
[UmsCommand("IELoadSystem.ReadData")]
void ReadData(string channelName, out Voltage voltage, out Current current, out Resistance resistance, out double setpoint, out bool isInputOn, out EloadModuleMode mode, out ushort status);
[UmsCommand("IELoadSystem.ReadMode")]
EloadModuleMode ReadMode(string channelName);
[UmsCommand("IELoadSystem.ReadOverCurrentProtection")]
Current ReadOverCurrentProtection(string channelName);
[UmsCommand("IELoadSystem.ReadOverVoltageProtection")]
Voltage ReadOverVoltageProtection(string channelName);
[UmsCommand("IELoadSystem.ReadProtectionStatus")]
ushort ReadProtectionStatus(string channelName);
[UmsCommand("IELoadSystem.ReadResistance")]
Resistance ReadResistance(string channelName);
[UmsCommand("IELoadSystem.ReadSetpoint")]
double ReadSetpoint(string channelName);
[UmsCommand("IELoadSystem.ReadVoltage")]
Voltage ReadVoltage(string channelName);
[UmsCommand("IELoadSystem.Selftest")]
void Selftest();
[UmsCommand("IELoadSystem.SetInitialSetting")]
void SetInitialSetting(string module);
[UmsCommand("IELoadSystem.SetInitialSettingAll")]
void SetInitialSettingAll();
[UmsCommand("IELoadSystem.SetMode")]
void SetMode(string channelName, EloadModuleMode mode);
[UmsCommand("IELoadSystem.SetSetpoint")]
void SetSetpoint(string channelName, double newSetpoint, EloadModuleMode mode);
}
}

View File

@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.ELoadSystem.Contracts</AssemblyName>
<Description>IELoadSystem Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.1.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>
<ItemGroup>
<ProjectReference Include="..\IELoad\IELoad.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,36 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using Raytheon.Communication;
using System;
namespace Raytheon.Instruments
{
/// <summary>
/// This interfaces defines the API for a flow meter
/// </summary>
[UmsContract]
public interface IFlowMeter : IInstrument
{
/// <summary>
///
/// </summary>
/// <returns></returns>
[UmsCommand("IFlowMeter.ReadFlow")]
double ReadFlow();
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.FlowMeter.Contracts</AssemblyName>
<Description>FlowMeter Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.3.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,99 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface for FPGA communication
/// </summary>
public interface IFpgaComm : IInstrument
{
/// <summary>
///
/// </summary>
/// <param name="fpgaName">The name of the FPGA</param>
[UmsCommand("IFpgaComm.Initialize")]
void Initialize(string fpgaName);
/// <summary>
///
/// </summary>
/// <param name="fpgaName">The name of the FPGA</param>
[UmsCommand("IFpgaComm.LoadFirmware")]
void LoadFirmware(string fpgaName);
/// <summary>
///
/// </summary>
/// <param name="fpgaName">The name of the FPGA</param>
/// <param name="address">The address to read from</param>
/// <returns>The data conttained in the FPGA at the address specified</returns>
[UmsCommand("IFpgaComm.Read")]
uint Read(string fpgaName, uint address);
/// <summary>
///
/// </summary>
/// <param name="fpgaName"></param>
/// <param name="address"></param>
/// <param name="numberOfWordsToRead"></param>
/// <param name="shallWeIncrementAddress"></param>
/// <param name="dataRead"></param>
/// <returns></returns>
[UmsCommand("IFpgaComm.ReadBlock")]
void ReadBlock(string fpgaName, uint address, uint numberOfWordsToRead, bool shallWeIncrementAddress, ref uint[] dataRead);
/// <summary>
///
/// </summary>
/// <param name="fpgaName">The name of the FPGA</param>
/// <param name="address">The address to write to</param>
/// <param name="value">The value to write</param>
[UmsCommand("IFpgaComm.Write")]
void Write(string fpgaName, uint address, uint value);
/// <summary>
///
/// </summary>
/// <param name="fpgaName"></param>
/// <param name="address"></param>
/// <param name="numberOfWordsToWrite"></param>
/// <param name="data"></param>
/// <param name="shallWeIncrementAddress"></param>
/// <returns></returns>
[UmsCommand("IFpgaComm.WriteBlock")]
void WriteBlock(string fpgaName, uint address, uint numberOfWordsToWrite, uint[] data, bool shallWeIncrementAddress);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.FpgaComm.Contracts</AssemblyName>
<Description>FpgaComm Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.1.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,44 @@
/*-------------------------------------------------------------------------
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments.GeneralIO
{
public enum ConfigIni
{
// list all the keys here
SHALL_WE_DRIVE_OUTPUT_UPON_INITIALIZATION,
OUTPUT_SIGNALS,
INPUT_SIGNALS,
NUM_CHANNELS_PER_PORT,
CHANNEL_START_INDEX,
NUM_OUTPUT_CHANNELS,
NUM_INPUT_CHANNELS,
COM_PORT,
DIO_ADDRESS,
DIO_OPTIONS,
DEVICE_NUMBER,
PXI_CARD_SLOT_INDEX
}
}

View File

@@ -0,0 +1,31 @@
/*-------------------------------------------------------------------------
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments.GeneralIO
{
public enum ConfigXml
{
// list all the keys here
DIO_MODULE_DEF_FILEPATH
}
}

View File

@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments
{
public class IODatatypes
{
public struct DIOChannelInfo
{
public uint channelNumber;
public int initialValue;
};
/// <summary>
/// Bit state, high or low
/// </summary>
[DataContract]
public enum BitState
{
/// <summary>
/// low state
/// </summary>
[EnumMember]
Low,
/// <summary>
/// high state
/// </summary>
[EnumMember]
High
}
/// <summary>
/// BitType - setup info, input or output type bit
/// </summary>
[DataContract]
public enum BitType
{
/// <summary>
/// digital input bit
/// </summary>
[EnumMember]
Input,
/// <summary>
/// digital output bit
/// </summary>
[EnumMember]
Output
}
/// <summary>
/// enumeration for the several types of IO
/// </summary>
[DataContract]
public enum IOType
{
/// <summary>
/// an analog input
/// </summary>
[EnumMember]
AnalogInput,
/// <summary>
/// an analog output
/// </summary>
[EnumMember]
AnalogOutput,
/// <summary>
/// a digital input
/// </summary>
[EnumMember]
DigitalInput,
/// <summary>
/// a digital output
/// </summary>
[EnumMember]
DigitalOutput,
/// <summary>
/// a clock type output
/// </summary>
[EnumMember]
Clock,
}
}
}

View File

@@ -0,0 +1,118 @@
// *******************************************************************************************
// ** **
// ** IGeneralIO.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 Raytheon.Communication;
using Raytheon.Instruments;
namespace Raytheon.Instruments
{
/// <summary>
/// IGeneralIO - base interface for an IO type instrument
/// </summary>
[UmsContract]
public interface IGeneralIO : IInstrument
{
/// <summary>
/// Gets the bit's current state
/// </summary>
/// <param name="signalName"></param>
/// <returns>
/// the bit's current <see cref="BitState" />
/// </returns>
[UmsCommand( "IGeneralIO.GetBitState" )]
IODatatypes.BitState GetBitState(string signalName);
/// <summary>
/// Get signal names
/// </summary>
/// <param></param>
/// <returns>
/// </returns>
[UmsCommand("IGeneralIO.GetSignalNames")]
List<string> GetSignalNames();
/// <summary>
/// Gets the number of input bits.
/// </summary>
/// <value>
/// The number input bits.
/// </value>
UInt32 NumberOfInputBits
{
[UmsCommand( "IGeneralIO.GetNumberOfInputBits" )]
get;
}
/// <summary>
/// Gets the number of output bits.
/// </summary>
/// <value>
/// The number output bits.
/// </value>
UInt32 NumberOfOutputBits
{
[UmsCommand( "IGeneralIO.GetNumberOfOutputBits" )]
get;
}
/// <summary>
/// Sets the bit to high or low <see cref="BitState"/>.
/// </summary>
/// <remarks>
/// Only allowed on output bits
/// </remarks>
/// <param name="signalName"></param>
/// <param name="state">The state <see cref="BitState"/>.</param>
[UmsCommand( "IGeneralIO.SetBit" )]
void SetBit(string signalName, IODatatypes.BitState state);
/// <summary>
/// Command an output bit to logic Z state
/// </summary>
/// <param name="signalName">The output bit number</param>
[UmsCommand( "IGeneralIO.SetTristate" )]
void SetTristate(string signalName);
//*** possible enhancements
//bool ConfigureBitType(UInt32 bit, GeneralIo.BitType type);
//bool[] GetBits();
//GeneralIo.BitType GetBitType(UInt32 bit);
//void SetBits(bool[] all);
//bool MaskBits(specialobj[] obj); //maybe an object with bit# and value?
}
}

View File

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.GeneralIO.Contracts</AssemblyName>
<Description>Instrument interface for General IO</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.7.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,53 @@
//******************************************************************************//
// 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.
//
// 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.
//
// DOD 5220.22-M, INDUSTRIAL SECURITY MANUAL, CHAPTER 5, SECTION 1 THROUGH 9 :
// FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN OR DOD 5200.1-R,
// INFORMATION SECURITY PROGRAM, CHAPTER 6. FOR UNCLASSIFIED, LIMITED DOCUMENTS
// DESTROY BY ANY METHOD THAT WILL PREVENT DISCLOSURE OF CONTENTS OR
// RECONSTRUCTION OF THE DOCUMENT.
//******************************************************************************//
using Raytheon.Communication;
namespace Raytheon.Instruments
{
/// <summary>
/// Interface for Jtag type instruments
/// </summary>
[UmsContract]
public interface IJtag : IInstrument
{
/// <summary>
/// Basic interface for running JTAG tests
/// </summary>
/// <param name="jobInfo"><see cref="JtagJobInfo"/> Will determine the application and commands
/// that are used for the JTAG job</param>
/// <returns>Returns the result of the run</returns>
[UmsCommand( "IJtag.PerformJtagJob" )]
int PerformJtagJob( JtagJobInfo jobInfo );
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.Jtag.Contracts</AssemblyName>
<Description>Jtag Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.1.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,85 @@
//******************************************************************************//
// 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.
//
// 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.
//
// DOD 5220.22-M, INDUSTRIAL SECURITY MANUAL, CHAPTER 5, SECTION 1 THROUGH 9 :
// FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN OR DOD 5200.1-R,
// INFORMATION SECURITY PROGRAM, CHAPTER 6. FOR UNCLASSIFIED, LIMITED DOCUMENTS
// DESTROY BY ANY METHOD THAT WILL PREVENT DISCLOSURE OF CONTENTS OR
// RECONSTRUCTION OF THE DOCUMENT.
//******************************************************************************//
using System.Collections.Generic;
namespace Raytheon.Instruments
{
/// <summary>
/// Class that only contains variables that are used to configure a JTAG job
/// </summary>
public class JtagJobInfo
{
/// <summary>
/// Unique identifier for the client side
/// </summary>
public string jobName;
/// <summary>
/// </summary>
public string bsxFilePath;
/// <summary>
/// </summary>
public string bsxFile;
/// <summary>
/// </summary>
public string bsxFileCommandline;
/// <summary>
/// </summary>
public bool shallWeUseDiag1;
/// <summary>
/// </summary>
public string diag1File;
/// <summary>
/// </summary>
public string diag1CmdLine;
/// <summary>
/// </summary>
public bool shallWeUseDiag2;
/// <summary>
/// </summary>
public string diag2File;
/// <summary>
/// </summary>
public string diag2CmdLine;
}
}

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.LspsChamber.Contracts</AssemblyName>
<Description>Low-Background Scanning Point Source Motion interface definition</Description>
<OutputType>Library</OutputType>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.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>

View File

@@ -0,0 +1,234 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.LSPS;
using Raytheon.Units;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
[UmsContract]
public interface ILspsChamber : IInstrument
{
#region AutoFill Functions
[UmsCommand("ILspsChamber.AutoFillCoolDown")]
void AutoFillCoolDown();
[UmsCommand("ILspsChamber.AutoFillWarmUp")]
void AutoFillWarmUp();
[UmsCommand("ILspsChamber.AutoFillForce")]
void AutoFillForce();
[UmsCommand("ILspsChamber.AutoFillTurnOff")]
void AutoFillTurnOff();
[UmsCommand("ILspsChamber.GetAutoFillState")]
LSPS.AutoFillState GetAutoFillState();
[UmsCommand("ILspsChamber.GetTimeToFill")]
double GetTimeToFill();
#endregion
#region NIF Functions
[UmsCommand("ILspsChamber.CloseLspsGateValve")]
void CloseLspsGateValve();
[UmsCommand("ILspsChamber.OpenLspsGateValve")]
void OpenLspsGateValve();
[UmsCommand("ILspsChamber.GetLspsGateValvePosition")]
GateValvePosition GetLspsGateValvePosition();
[UmsCommand("ILspsChamber.GetTemperature")]
double GetTemperature(LSPS.TemperatureIndex tempIndex);
[UmsCommand("ILspsChamber.GetInputIndex")]
int GetInputIndex(int inputIndex);
#endregion
#region RIO Functions
[UmsCommand("ILspsChamber.CloseVhfGateValve")]
void CloseVhfGateValve();
[UmsCommand("ILspsChamber.OpenVhfGateValve")]
void OpenVhfGateValve();
[UmsCommand("ILspsChamber.GetVhfGateValveChamberPressure")]
double GetVhfGateValveChamberPressure();
[UmsCommand("ILspsChamber.GetVhfGateValveUutPressure")]
double GetVhfGateValveUutPressure();
[UmsCommand("ILspsChamber.GetVhfGateValveClosedInput")]
int GetVhfGateValveClosedInput();
[UmsCommand("ILspsChamber.GetVhfGateValveOpenInput")]
int GetVhfGateValveOpenInput();
#endregion
#region Chamber Vacuum Functions
[UmsCommand("ILspsChamber.GetLspsChamberPressure")]
double GetLspsChamberPressure();
[UmsCommand("ILspsChamber.GetLspsUutPressure")]
double GetLspsUutPressure();
#endregion
#region GALIL Functions
[UmsCommand("ILspsChamber.FilterWheelHome")]
void FilterWheelHome();
[UmsCommand("ILspsChamber.SetFilterWheelPosition")]
void SetFilterWheelPosition(int position);
[UmsCommand("ILspsChamber.GetFilterWheelPosition")]
int GetFilterWheelPosition();
[UmsCommand("ILspsChamber.GetFilterWheelStatus")]
LSPS.TargetAndFilterWheelStatus GetFilterWheelStatus();
[UmsCommand("ILspsChamber.TargetWheelHome")]
void TargetWheelHome();
[UmsCommand("ILspsChamber.SetTargetWheelPosition")]
void SetTargetWheelPosition(int position);
[UmsCommand("ILspsChamber.GetTargetWheelPosition")]
int GetTargetWheelPosition();
[UmsCommand("ILspsChamber.GetTargetWheelStatus")]
LSPS.TargetAndFilterWheelStatus GetTargetWheelStatus();
[UmsCommand("ILspsChamber.SteeringMirrorHome")]
void SteeringMirrorHome();
[UmsCommand("ILspsChamber.SteeringMirrorStop")]
void SteeringMirrorStop();
[UmsCommand("ILspsChamber.SteeringMirrorMove")]
void SteeringMirrorMove(double az, double el, double speed);
[UmsCommand("ILspsChamber.SteeringMirrorGetBeamAngles")]
Tuple<double, double> SteeringMirrorGetBeamAngles();
[UmsCommand("ILspsChamber.SteeringMirrorSetBeamSpeed")]
void SteeringMirrorSetBeamSpeed(double speed);
[UmsCommand("ILspsChamber.SteeringMirrorSetRightLeftArrowAngle")]
void SteeringMirrorSetRightLeftArrowAngle(double angle);
[UmsCommand("ILspsChamber.SteeringMirrorSetUpDownArrowAngle")]
void SteeringMirrorSetUpDownArrowAngle(double angle);
[UmsCommand("ILspsChamber.GetSteeringMirrorStatus")]
Tuple<LSPS.SteeringMirrorStatus, LSPS.SteeringMirrorStatus> GetSteeringMirrorStatus();
[UmsCommand("ILspsChamber.SteeringMirrorLoadProfile")]
void SteeringMirrorLoadProfileFromFile(string profileFilePath);
[UmsCommand("ILspsChamber.SteeringMirrorLoadProfileStep")]
void SteeringMirrorLoadProfileStep(double az, double el, double speed);
[UmsCommand("ILspsChamber.SteeringMirrorResetProfile")]
void SteeringMirrorResetProfile();
[UmsCommand("ILspsChamber.SteeringMirrorRunProfile")]
void SteeringMirrorRunProfile(LSPS.SteeringMirrorProfileMode profileMode = LSPS.SteeringMirrorProfileMode.LEARNED,
LSPS.SteeringMirrorMovementMode movementMode = LSPS.SteeringMirrorMovementMode.ABSOLUTE);
[UmsCommand("ILspsChamber.SteeringMirrorMoveToBeginningOfProfile")]
void SteeringMirrorMoveToBeginningOfProfile();
[UmsCommand("ILspsChamber.SteeringMirrorRunNextStepInProfile")]
void SteeringMirrorRunNextStepInProfile();
#endregion
#region BlackBody Functions
[UmsCommand("ILspsChamber.SetBlackBodySetpointTemperature")]
void SetBlackBodySetpointTemperature(double temperature);
[UmsCommand("ILspsChamber.GetBlackbodyHeaterPercent")]
double GetBlackbodyHeaterPercent();
[UmsCommand("ILspsChamber.GetBlackbodySetpoint")]
double GetBlackbodySetpoint();
[UmsCommand("ILspsChamber.GetBlackbodyStability")]
Tuple<LSPS.Stability, LSPS.Stability> GetBlackbodyStability(int? logRateInMs = null);
[UmsCommand("ILspsChamber.GetBlackbodyControlState")]
LSPS.BlackBodyControlState GetBlackbodyControlState();
[UmsCommand("ILspsChamber.GetBlackbodyRateOfChange")]
double GetBlackbodyRateOfChange();
[UmsCommand("ILspsChamber.GetBlackbodyTemperature")]
Tuple<double, double> GetBlackbodyTemperature();
[UmsCommand("ILspsChamber.GetBlackbodyBIT")]
int GetBlackbodyBIT();
#endregion
#region Chopper Functions
[UmsCommand("ILspsChamber.SetChopperFrequency")]
void SetChopperFrequency(double frequency);
[UmsCommand("ILspsChamber.GetChopperFrequency")]
double GetChopperFrequency();
[UmsCommand("ILspsChamber.TurnOffChopperWheel")]
void TurnOffChopperWheel();
[UmsCommand("ILspsChamber.SetStopOpen")]
void SetStopOpen();
[UmsCommand("ILspsChamber.SetStopClosed")]
void SetStopClosed();
[UmsCommand("ILspsChamber.GetChopperStability")]
LSPS.Stability GetChopperStability();
[UmsCommand("ILspsChamber.GetChopperState")]
LSPS.ChopperState GetChopperState();
#endregion
#region Misc Functions
[UmsCommand("ILspsChamber.SendACommand")]
void SendACommand(string command);
#endregion
}
}

View File

@@ -0,0 +1,264 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Units;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Raytheon.Instruments.LSPS
{
public enum TemperatureIndex
{
TANK_TOP,
TANK_BOTTOM
}
public enum GateValvePosition
{
OPEN,
CLOSE
}
public enum WaitOption
{
WAIT,
NO_WAIT
}
public enum Stability
{
UNSTABLE,
STABLE
}
public enum AutoFillState
{
OFF,
COOLING,
WARMING
}
public enum ChopperState
{
OFF = 10,
ON,
MOVING,
STOP_OPEN,
STOP_CLOSE,
FIND_ERROR,
MOVE_ERROR,
CHANGE_DIRECTION,
CHANGE_SPEED,
LOOKING_FOR_STOP_OPEN,
LOOKING_FOR_STOP_CLOSED
}
public enum BlackBodyControlState
{
LN2_COOLING,
CONTROLLING,
NOT_CONTROLLING
}
public enum FilterWheelPositions
{
Open = 1,
ND_1PT0,
ND_1PT3,
ND_1PT6,
ND_2PT0,
ND_2PT3,
ND_2PT6,
CLOSED,
DIFFUSED
}
public enum TargetWheelPositions
{
P_25_URAD = 1,
P_33_URAD,
P_40_URAD,
P_50_URAD,
P_66_URAD,
P_80_URAD,
P_15_URAD,
P_2000_URAD_SQUARE,
P_0PT1875_IN,
P_0PT75_IN_FULL,
P_20_URAD,
SLIT,
P_80_URAD_DUAL,
P_115_URAD,
RETRO_BALL,
BLANK
}
public enum SteeringMirrorStatus
{
NEEDS_HOME,
HOMING,
MOVING,
FORWARD_LIMIT,
REAR_LIMIT,
FIND_POSITION_ERROR,
FIND_HOME_ERROR,
IN_POSITION,
TIMEOUT,
HOME_FORWARD_LIMIT,
HOME_REAR_LIMIT
}
public enum TargetAndFilterWheelStatus
{
NEEDS_HOME,
HOMING,
MOVING,
HOME_SWITCH_ERROR,
POSITION_SWITCH_ERROR,
FIND_POSITION_ERROR,
FIND_HOME_ERROR,
IN_POSITION,
TIMEOUT
}
public enum SteeringMirrorProfileMode
{
LEARNED,
OPEN_LOOP,
PRE_LEARNED,
VELOCITY
}
public enum SteeringMirrorMovementMode
{
ABSOLUTE,
RELATIVE
}
public class LSPSPoint
{
public LSPSPoint() { }
public LSPSPoint(double speed, double az, double el)
{
speed_ = speed;
az_ = az;
el_ = el;
}
public double speed_ { get; set; }
public double az_ { get; set; }
public double el_ { get; set; }
}
public class LSPSData
{
public string Name { get; set; }
public AutoFillData AutoFill { get; set; } = new AutoFillData();
public BlackBodyData BlackBodyData { get; set; } = new BlackBodyData();
public CVACData CVACData { get; set; } = new CVACData();
public ChopperData ChopperData { get; set; } = new ChopperData();
public GalilData GalilData { get; set; } = new GalilData();
public NIFData NIFData { get; set; } = new NIFData();
}
public class AutoFillData
{
public string TTF { get; set; } = string.Empty;
public AutoFillState State { get; set; }
}
public class BlackBodyData
{
public double TempA { get; set; }
public double TempB { get; set; }
public double ChangeRate { get; set; }
public BlackBodyControlState ControlState { get; set; }
public double Heater { get; set; }
public double SetPoint { get; set; }
public LSPS.Stability StabilityA { get; set; }
public LSPS.Stability StabilityB { get; set; }
public int Bit { get; set; }
}
public class CVACData
{
public string CVAC { get; set; }
public string SVAC { get; set; }
}
public class ChopperData
{
public double Frequency { get; set; }
public Stability Stability { get; set; }
public ChopperState State { get; set; }
}
public class GalilData
{
public double TWPosition { get; set; }
public double SMBeamAngleAz { get; set; }
public double SMBeamAngleEl { get; set; }
public double FWPosition { get; set; }
}
public class NIFData
{
public double TankTop { get; set; }
public double TankBottom { get; set; }
}
}

View File

@@ -0,0 +1,51 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Units;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
[UmsContract]
public interface INetCdfData : IInstrument
{
[UmsCommand("INetCdfData.ProcessNcdfData")]
void ProcessNcdfData(string prefix, string suffix, string testDataPath);
[UmsCommand("INetCdfData.SetValue")]
void SetValue<T>(NCDF.Names name, T value, NCDF.AttrPosition videoId);
}
}

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.NetCdfData.Contracts</AssemblyName>
<Description>NCDF Data interface definition</Description>
<OutputType>Library</OutputType>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.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>

View File

@@ -0,0 +1,327 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Units;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Raytheon.Instruments.NCDF
{
public enum Names
{
ACTIVITY,
APERTURE,
AZ_LOCATION,
B_B_CONTROLER,
CHOPPER_FREQ,
DATA_FOLDER,
DATE,
EL_LOCATION,
FILENAME,
F_P_A,
INDICATOR_CODE,
SITE_LOCATION,
MEASURED_APERTURE_POSITION,
MEASURED_AZ_POSITION,
_B_B_TEMP,
MEASURED_EL_POSITION,
MEASURED_FILTER_POSITION,
N_FRAMES,
OPERATOR,
POSITION,
REMARKS,
RADCAL_AUTOFILL_STATE,
RADCAL_AUTOFILL_TIMETOFILL,
RADCAL_BB_BIT,
RADCAL_BB_CTRL_STATE,
RADCAL_BB_HEATER,
RADCAL_BB_RATE_O_CHANGE,
RADCAL_BB_SETPOINT,
RADCAL_BB_STABILITY_A,
RADCAL_BB_STABILITY_B,
RADCAL_C_VAC,
RADCAL_CHOPPER_FREQ,
RADCAL_CHOPPER_STABILITY,
RADCAL_CHOPPER_STATE,
RADCAL_GATE_VALVE,
RADCAL_NIF_TEMP_TANK_BOTTOM,
RADCAL_NIF_TEMP_TANK_TOP,
RADCAL_PVAC_RVAC,
RADCAL_PVAC_TVAC,
RADCAL_S_VAC,
VHF_GV_CHAMBER_VAC,
VHF_GV_UUT_VAC,
REGION,
SCAN_MIRROR_X_POSITION,
SCAN_MIRROR_Y_POSITION,
SCAN_SPEED,
SCAN_PATTERN,
SCAN_RADIUS,
SCRIPT_NAME,
SET_POINT_AZ,
SET_POINT_EL,
TARGET_WHEEL_POSITION,
TEST_POSITION_NO,
TEST_PROCEDURE_DOC,
TEST_PROCEDURE_DOC_REV,
TEST_STEP,
TEST_TYPE_CODE,
TIME_RECORDED,
VERSION,
V_O_B_APERTURE,
VOB_CAN_TEMP,
CHOPPER_STATUS,
VOB_FILTER_POS,
VOB_GATE_VALVE_STATUS,
VOB_LAMBDA,
VOB_REGION,
VOB_TARGET_REGION,
CHAMBER_PRESSURE,
VOB_CHOPPER_FREQ,
VSS_INPUT_CHOPPER_FREQ,
VSS_INPUT_CHOPPER_STATUS,
VSS_MID_CHOPPER_FREQ,
VSS_MID_CHOPPER_STATUS,
X_LOCATION,
X_SIZE,
X_TARGET,
Y_LOCATION,
Y_SIZE,
Y_TARGET,
LAST_BAND_SEL,
BAND_SEL,
READ_SEQ_DEL,
ROW_START,
ROW_STOP,
INTEGRATION_TIME,
B1_DET_BIAS_OFFS,
B1_DET_BIAS,
B2_DET_BIAS,
UC_GAIN,
BGSEN,
B1_RAMP,
B2_RAMP,
COL_AMP_GAIN,
COL_AMP_IN_OFFS,
COL_AMP_OUT_OFFS,
OUT_BUF_SLEW,
OUT_BUF_CAS,
RESET_TIME,
GLOBAL_TEST_ENABLE,
UC_RAMP_TEST,
SEEKER_SN,
SEEKER_PN,
GEU_PN,
GEU_SN,
SENSOR_SN,
SENSOR_PN,
IMU_SN,
IMU_PN,
IICCA_SN,
IICCA_PN,
IDA_SN,
IDA_PN,
CRYOSTAT_SN,
CRYOSTAT_PN,
ENVIRONMENT_ERROR,
SET_LAST_BAND_SEL,
SET_BAND_SEL,
SET_READ_SEQ_DEL,
SET_ROW_START,
SET_ROW_STOP,
SET_INTEG_TIME,
SET_B1_DET_BIAS_OFFS,
SET_B1_DET_BIAS,
SET_B2_DET_BIAS,
SET_UC_GAIN,
SET_BGSEN,
SET_B1_RAMP,
SET_B2_RAMP,
SET_COL_AMP_GAIN,
SET_COL_AMP_IN_OFFS,
SET_COL_AMP_OUT_OFFS,
SET_OUT_BUF_SLEW,
SET_OUT_BUF_CAS,
SET_RESET_TIME,
SET_GLOBAL_TEST_ENABLE,
SET_UC_RAMP_TEST,
BAND,
FILE_TYPE,
FRAME_RATE,
INTEGRATION_TIME_BAND1,
INTEGRATION_TIME_BAND2,
LAKESHORE_SLOPE,
LAKESHORE_INTERCEPT,
LOCATION_ORIGIN,
SENSOR_CONFIGURATION,
SERIAL,
VIDEO_TEST,
X_START,
Y_START,
_V_DET_COM,
VRAMP,
IICCA_FIRM_VER,
IDA_VOLTS,
IDA_TEMP,
V_P3_R4_A_S,
V_N3_R4_A,
V_P5_R3_A,
BIAS_RESERVE,
VP_DET_COM_B1,
VP_E_S_D,
VN_OUT,
VP_OUT,
VN_UC,
VP_UC,
VN_D,
VP_D,
VN_A,
VP_A,
BENCH,
SEEKER_BUILD,
SENSOR_BUILD,
PROGRAM_NAME,
TESTPOSITIONTYPE,
TEST_TYPE_VARIANT,
ENVIRONMENT_ERROR_NOTES,
T_E_CHAMBER_I_D,
T_E_G_U_T_S_I_D,
T_E_C_T_S_I_D,
T_E_SHAKER_I_D,
T_E_THERMOTRON_I_D,
T_E_CHAMBER_WINDOW_I_D,
T_E_U_U_T_WINDOW_I_D,
T_E_B_B_CONTROLLER_S_N,
T_E_V_S_S_PYRO_DET,
T_E_CHAMBER_SW_VERSION,
T_E_CHAMBER_SW_BUILD,
T_E_G_U_T_S_S_W_VERSION,
T_E_G_U_T_S_S_W_BUILD,
T_E_V_T_I_FIRMWARE_VERSION,
T_E_V_T_I_FIRMWARE_BUILD,
T_E_I_A_F_S_W_VERSION,
T_E_I_A_F_S_W_BUILD,
MONOCHROMETER_POSITION,
B_B_E_S_TARGET,
EMISSIVITY,
CUTOFFWAVELENGTH,
CUTONWAVELENGTH,
TARGET_REGION,
MEASURED_BLACK_BODY_TEMPERATURE,
MEASURED_MONOCHROMETER_POSITION,
V_O_B_CAN_TEMP,
V_O_B_CHAMBER_PRESSURE,
V_O_B_CHOPPER_STATUS,
V_O_B_LAMBDA,
L_S_P_S_GATE_VALVE_STATUS,
SENSOR,
VGATE,
VOFFSET,
EXTERNAL_A_D_C_V_DET_COM,
INTEG_TIME,
AUTOCOLLIMATOR_EL,
AUTOCOLLIMATOR_AZ,
B_B_E_S_TEMP,
B_B_E_S_FILTER_WHEEL,
VOB_AMP_AVG_R,
VOB_AVG_X_VOLTAGE,
VSS_LOCKIN_1_COUPLE,
VSS_LOCKIN_1_GROUND,
VSS_LOCKIN_1_RESERVE,
VOB_AMP_SEN,
VSS_LOCKIN_1_SLOPE,
VOB_AMP_TIME_CONST,
VOB_AMP2_AVG_R,
VOB_AVG2_X_VOLTAGE,
VSS_LOCKIN_2_COUPLE,
VSS_LOCKIN_2_GROUND,
VSS_LOCKIN_2_RESERVE,
VOB_AMP2_SEN,
VSS_LOCKIN_2_SLOPE,
VOB_AMP2_TIME_CONST,
SET_V_DET_COM,
MONOCHROMETER_1_POSITION,
MONOCHROMETER_2_POSITION,
FILTER,
FPA_SN,
T_E_I_A_F_I_D,
T_E_V_T_I_I_D,
BUILDING,
FOCUS_POSITION,
F_C_D_START_TIME,
F_C_D_FRAMECNT,
F_C_D_LINECUT_TIME,
F_C_D_LINECUT_FRAMECNT,
C_O_L,
SOAK_TEMPERATURE,
SCAN_RATE,
ORIENTATION,
GALILC_FOCUS_POSITION,
GALILC_ABS_FOCUS_POSITION,
GALILC_ENCODER_FOCUS_POSITION,
NUM_NAMES
};
public enum AttrPosition
{
GLOBAL,
LATEST_VID,
BOTH
};
public enum DataType
{
STRING,
INT,
FLOAT
};
public class NetCdfValue
{
public NetCdfValue(string value, string name, bool set, AttrPosition videoId = AttrPosition.GLOBAL, DataType type = DataType.STRING)
{
value_ = value;
name_ = name;
set_ = set;
videoId_ = videoId;
type_ = type;
}
public string value_ { get; set; }
public string name_ { get; set; }
public bool set_ { get; set; }
public DataType type_ { get; set; }
public AttrPosition videoId_ { get; set; }
}
}

View File

@@ -0,0 +1,79 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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;
namespace Raytheon.Instruments
{
public interface IOscilloScope : IInstrument
{
[UmsCommand( "IOscilloScope.IOQuery" )]
string IOQuery( string command );
[UmsCommand( "IOscilloScope.IOWrite" )]
void IOWrite( string command, bool shallWeCheckForError = true );
[UmsCommand( "IOscilloScope.MeasureFallTime" )]
double MeasureFallTime( int channelNumber );
[UmsCommand( "IOscilloScope.MeasureFrequency" )]
double MeasureFrequency( int channelNumber );
[UmsCommand( "IOscilloScope.MeasureMaxVoltage" )]
double MeasureMaxVoltage( int channelNumber );
[UmsCommand( "IOscilloScope.MeasureMinVoltage" )]
double MeasureMinVoltage( int channelNumber );
[UmsCommand( "IOscilloScope.MeasurePulseWidth" )]
double MeasurePulseWidth( int channelNumber );
[UmsCommand( "IOscilloScope.MeasureRiseTime" )]
double MeasureRiseTime( int channelNumber );
[UmsCommand( "IOscilloScope.MeasureVoltageLevel" )]
double MeasureVoltageLevel( int channelNumber );
[UmsCommand( "IOscilloScope.ConfigureChannel" )]
void ConfigureChannel( int channelNumber, double timePerDivison, double timeOffset, double voltageOffset, double voltageScale, string inputImpedance );
[UmsCommand( "IOscilloScope.SetupTrigger" )]
void SetupTrigger( bool useRisingEdge, int channelNumber, double triggerLevel );
[UmsCommand( "IOscilloScope.HasItTriggered" )]
bool HasItTriggered( );
[UmsCommand( "IOscilloScope.SaveImage" )]
void SaveImage( string fileName );
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.OscilloScope.Contracts</AssemblyName>
<Description>OscilloScope Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.3.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,64 @@
// *******************************************************************************************
// ** **
// ** IPowerMeter.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.Communication;
using Raytheon.Units;
using System.Diagnostics.CodeAnalysis;
namespace Raytheon.Instruments
{
[UmsContract]
public interface IPowerMeter : IInstrument
{
[UmsCommand("IPowerMeter.EnableChannel")]
bool EnableChannel(int channel, bool enable);
[UmsCommand("IPowerMeter.GetMeasurement")]
Power GetMeasurement(int channel);
[UmsCommand("IPowerMeter.SetFrequency")]
bool SetFrequency(int channel, Frequency frequency);
[UmsCommand("IPowerMeter.ZeroMeter")]
bool ZeroMeter();
int Channels { [UmsCommand("IPowerMeter.GetChannels")]get; }
}
}

View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.PowerMeter.Contracts</AssemblyName>
<Description>Instrument interface for General IO</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>3.1.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.*" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,28 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
namespace Raytheon.Instruments.PowerSupply
{
/// <summary>
/// A spot to hold application constants
/// </summary>
public static class Constants
{
public const string PowerSupplySystemDefFilename = "POWER_SUPPLY_SYSTEMS.ini";
}
}

View File

@@ -0,0 +1,243 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.PowerSupply;
using System.Collections.Generic;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface for power systems to implement.
/// </summary>
[UmsContract]
public interface IPowerSupplySystem : IInstrument
{
/// <summary>
/// Get the power system error register
/// </summary>
/// <param name="errorCode">The register value</param>
/// <returns></returns>
[UmsCommand( "IPowerSupplySystem.GetErrorCode" )]
string GetErrorCode( out int errorCode );
/// <summary>
/// Get a list of modules that belong to this power system
/// </summary>
/// <returns>A list of modules belonging to this system</returns>
[UmsCommand( "IPowerSupplySystem.GetModuleNames" )]
List<string> GetModuleNames( );
/// <summary>
/// Get the dictionary that contains configuration information for each module
/// </summary>
/// <returns></returns>
Dictionary<string, PowerSupplyModuleInfo> GetPowerSupplyModuleInfoDict(string powerSystem);
/// <summary>
/// Retrieve the programmed OCP value of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The programmed setting</returns>
[UmsCommand( "IPowerSupplySystem.GetOverCurrentSetting" )]
double GetOverCurrentSetting( string moduleName );
/// <summary>
/// Retrieve the programmed OVP value of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The programmed setting</returns>
[UmsCommand( "IPowerSupplySystem.GetOverVoltageSetting" )]
double GetOverVoltageSetting( string moduleName );
/// <summary>
/// Retrieve the programmed slew value of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The programmed setting</returns>
[UmsCommand( "IPowerSupplySystem.GetSlewRate" )]
double GetSlewRate( string name );
/// <summary>
/// returns back system name
/// </summary>
/// <returns></returns>
[UmsCommand( "IPowerSupplySystem.GetSystemName" )]
string GetSystemName( );
/// <summary>
/// Retrieve the programmed voltage setpoint value of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The programmed setting</returns>
[UmsCommand( "IPowerSupplySystem.GetVoltageSetting" )]
double GetVoltageSetting( string moduleName );
/// <summary>
/// Query a supple to see if output is enabled
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>true if output is on, false if it is off</returns>
[UmsCommand( "IPowerSupplySystem.IsOutputOn" )]
bool IsOutputOn( string moduleName );
/// <summary>
/// Measure the current of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The measured current</returns>
[UmsCommand( "IPowerSupplySystem.MeasureCurrent" )]
double MeasureCurrent( string moduleName );
/// <summary>
/// Measure the voltage of a module
/// </summary>
/// <param name="moduleName">The module to query</param>
/// <returns>The measured current</returns>
[UmsCommand( "IPowerSupplySystem.MeasureVoltage" )]
double MeasureVoltage( string moduleName );
/// <summary>
/// Turn off a module output
/// </summary>
/// <param name="moduleName">The module to turn off</param>
[UmsCommand( "IPowerSupplySystem.Off" )]
void Off( string moduleName );
/// <summary>
/// Turn on a module output
/// </summary>
/// <param name="moduleName">The module to turn on</param>
[UmsCommand( "IPowerSupplySystem.On" )]
void On( string moduleName );
/// <summary>
/// Read the protection status register
/// </summary>
/// <param name="moduleName">The module to read</param>
/// <returns>The register value</returns>
[UmsCommand( "IPowerSupplySystem.ReadProtectionStatus" )]
int ReadProtectionStatus( string moduleName );
/// <summary>
/// Read the power data for a module
/// </summary>
/// <param name="moduleName">The module to read</param>
/// <returns>THe Power Data</returns>
[UmsCommand( "IPowerSupplySystem.ReadPowerData" )]
void ReadPowerData( string moduleName, out double voltage, out double voltageSetpoint, out double current, out bool outputStatus, out int faultStatus );
/// <summary>
/// Set the slew rate
/// </summary>
/// <param name="moduleName">The module to set</param>
/// <param name="commandedSlew">The slew rate</param>
[UmsCommand( "IPowerSupplySystem.SetSlewRate" )]
void SetSlewRate( string moduleName, double commandedSlew );
/// <summary>
/// Resets the setpoint voltage to that which was passed into the constructor
/// </summary>
/// <param name="moduleName">The module to reset</param>
[UmsCommand( "IPowerSupplySystem.SetInitialVoltage" )]
void SetInitialVoltage( string moduleName );
/// <summary>
/// Set the voltage setpoint. Use this if you want to change the setpoint to a value that is different than what the module was initialized with
/// </summary>
/// <param name="moduleName">The module to set</param>
/// <param name="ocpValue">The value to set it to</param>
[UmsCommand( "IPowerSupplySystem.SetVoltageSetpoint" )]
void SetVoltageSetpoint( string moduleName, double volts );
/// <summary>
/// Disable the system watchdog
/// </summary>
[UmsCommand( "IPowerSupplySystem.WatchdogDisable" )]
void WatchdogDisable( );
/// <summary>
/// Enable the system watchdog
/// </summary>
/// <param name="timeInSeconds">The time in seconds which the app must communicate with the power system before the system get inhibited</param>
[UmsCommand( "IPowerSupplySystem.WatchdogEnable" )]
void WatchdogEnable( uint time );
/// <summary>
/// Set the OCP. Use this if you want to change OCP to a value that is different than what the module was initialized with
/// </summary>
/// <param name="moduleName">The module to set</param>
/// <param name="ocpValue">The value to set it to</param>
[UmsCommand( "IPowerSupplySystem.SetOverCurrentProtection" )]
void SetOverCurrentProtection( string moduleName, double ocpValue );
/// <summary>
/// Set the OVP. Use this if you want to change OVP to a value that is different than what the module was initialized with
/// </summary>
/// <param name="moduleName">The module to set</param>
/// <param name="ocpValue">The value to set it to</param>
[UmsCommand( "IPowerSupplySystem.SetOverVoltageProtection" )]
void SetOverVoltageProtection( string moduleName, double ovpValue );
/// <summary>
/// Send a command and return the response
/// </summary>
/// <param name="commandString"></param>
/// <returns></returns>
[UmsCommand( "IPowerSupplySystem.IOQuery" )]
string IOQuery( string command );
/// <summary>
/// Send a command
/// </summary>
/// <param name="commandString"></param>
[UmsCommand( "IPowerSupplySystem.IOWrite" )]
void IOWrite( string command );
/// <summary>
/// Read the power data for a module
/// </summary>
/// <param name="moduleName">The module to read</param>
/// <returns>THe Power Data</returns>
[UmsCommand( "IPowerSupplySystem.ReadPowerData" )]
PowerData ReadPowerData( string moduleName );
/// <summary>
/// Control the power supply internal mechanical relay state
/// </summary>
/// <param name="moduleName">The module to act on</param>
/// <param name="shallWeConnect">True to connect, false to disconnect</param>
[UmsCommand( "IPowerSupplySystem.MechanicalRelayOutputControl" )]
void MechanicalRelayOutputControl( string moduleName, bool shallWeConnect );
}
}

View File

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.PowerSupplySystem.Contracts</AssemblyName>
<Description>IPowerSupplySystem Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.3.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.6.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,95 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Runtime.Serialization;
namespace Raytheon.Instruments.PowerSupply
{
/// <summary>
/// A container for holding power supply data
/// </summary>
[Serializable]
[DataContract]
public class PowerData
{
/// <summary>
/// The constructor
/// </summary>
/// <param name="voltage"></param>
/// <param name="voltageSetpoint"></param>
/// <param name="overVoltageProtection"></param>
/// <param name="current"></param>
/// <param name="overCurrentProtection"></param>
/// <param name="outputStatus"></param>
/// <param name="faultStatus"></param>
public PowerData(double voltage, double voltageSetpoint, double overVoltageProtection, double current, double overCurrentProtection, bool outputStatus, int faultStatus)
{
Voltage = voltage;
VoltageSetpoint = voltageSetpoint;
OverVoltageProtection = overVoltageProtection;
Current = current;
OverCurrentProtection = overCurrentProtection;
OutputStatus = outputStatus;
FaultStatus = faultStatus;
}
/// <summary>
/// Getter for the Current
/// </summary>
[DataMember]
public double Current { get; set; }
/// <summary>
/// Getter for the fault status
/// </summary>
[DataMember]
public int FaultStatus { get; set; }
/// <summary>
/// Getter for the output status
/// </summary>
[DataMember]
public bool OutputStatus { get; set; }
/// <summary>
/// Getter for OCP value
/// </summary>
[DataMember]
public double OverCurrentProtection { get; set; }
/// <summary>
/// Getter for OVP value
/// </summary>
[DataMember]
public double OverVoltageProtection { get; set; }
/// <summary>
/// Getter for the voltage measurement
/// </summary>
[DataMember]
public double Voltage { get; set; }
/// <summary>
/// Getter for voltage setpoint
/// </summary>
[DataMember]
public double VoltageSetpoint { get; set; }
}
}

View File

@@ -0,0 +1,47 @@
/*-------------------------------------------------------------------------
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments.PowerSupply
{
public enum ConfigIni
{
// list all the keys here
SCPI_DEF_FILEPATH,
ETHERNET_ADDRESS,
ETHERNET_PORT,
ENABLE_OUTPUT_COUPLING_PROTECTION,
MODULE_DEFINITION,
COUPLED_MODULES,
GROUPED_MODULES,
INDEX,
OCP,
OVP,
VOLTAGE_SETPOINT,
VOLTAGE_SLEW_RATE,
MIN_VOLTAGE,
MAX_VOLTAGE,
MIN_CURRENT,
MAX_CURRENT,
IN_RUSH_DELAY_SECS
}
}

View File

@@ -0,0 +1,31 @@
/*-------------------------------------------------------------------------
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments.PowerSupply
{
public enum ConfigXml
{
// list all the keys here
POWER_SUPPLY_SYSTEM_DEF_FILEPATH
}
}

View File

@@ -0,0 +1,68 @@
/*-------------------------------------------------------------------------
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Raytheon.Instruments.PowerSupply
{
public class PowerSupplyModuleInfo
{
public PowerSupplyModuleInfo()
{
overCurrentProtection_ = -1.0;
overVoltageProtection_ = -1.0;
voltageSetpoint_ = -1.0;
voltageSlewRate_ = -1.0;
voltageLowerLimit_ = -1.0;
voltageUpperLimit_ = -1.0;
currentLowerLimit_ = -1.0;
currentUpperLimit_ = -1.0;
isOn_ = false;
faultStatus = -1;
}
public PowerSupplyModuleInfo(int moduleIndex, double overCurrentProtection, double overVoltageProtection, double voltageSetpoint, double voltageSlewRate, double minVoltage, double maxVoltage)
{
overCurrentProtection_ = overCurrentProtection;
overVoltageProtection_ = overVoltageProtection;
voltageSetpoint_ = voltageSetpoint;
voltageSlewRate_ = voltageSlewRate;
voltageLowerLimit_ = minVoltage;
voltageUpperLimit_ = maxVoltage;
isOn_ = false;
faultStatus = -1;
moduleNameFormat = $"(@{moduleIndex})";
}
public string moduleNameFormat;
public double overCurrentProtection_;
public double overVoltageProtection_;
public double voltageLowerLimit_;
public double voltageUpperLimit_;
public double currentLowerLimit_;
public double currentUpperLimit_;
public double voltageSetpoint_;
public double voltageSlewRate_;
public bool isOn_;
public int faultStatus;
}
}

View File

@@ -0,0 +1,60 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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.Framework;
namespace Raytheon.Instruments
{
/// <summary>
/// An interface for Signal Generators to implement.
/// </summary>
[UmsContract]
public interface ISignalGenerator : IInstrument
{
[UmsCommand("ISignalGenerator.Enable")]
void Enable(bool enable);
[UmsCommand("ISignalGenerator.IOQuery")]
string IOQuery(string command);
[UmsCommand("ISignalGenerator.IOWrite")]
void IOWrite(string command, bool shallWeCheckForError = true);
[UmsCommand("ISignalGenerator.SetFrequency")]
void SetFrequency(UnitizedValue frequency);
[UmsCommand("ISignalGenerator.SetPowerLevel")]
void SetPowerLevel(UnitizedValue powerLevel);
}
}

View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.SignalGenerator.Contracts</AssemblyName>
<Description>SignalGenerator Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.3.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
<PackageReference Include="Raytheon.Framework.Units" Version="1.*" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,94 @@
// ******************************************************************************************
// ** **
// ** 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. **
// ** **
// ** 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 System.Runtime.Serialization;
namespace Raytheon.Instruments
{
[DataContract]
public enum SpecAnAveragingType
{
[EnumMember]
RMS,
[EnumMember]
LOG,
[EnumMember]
NONE
};
/// <summary>
/// An interface for Spectrum Analyzers to implement.
/// </summary>
[UmsContract]
public interface ISpecAnalyzer : IInstrument
{
/// <summary>
///
/// </summary>
/// <param name="type"></param>
/// <param name="numOfAverages"></param>
[UmsCommand("ISpecAnalyzer.ConfigureAveraging")]
void ConfigureAveraging(SpecAnAveragingType type, int numOfAverages);
/// <summary>
///
/// </summary>
/// <param name="rbw">-99 represents auto[TBR]</param>
/// <param name="vbw">-99 represents auto[TBR]<</param>
[UmsCommand("ISpecAnalyzer.ConfigureBandwidth")]
void ConfigureBandwidth(int rbw, int vbw);
[UmsCommand("ISpecAnalyzer.ConfigureFrequency")]
void ConfigureFrequency(int centerFreq, int span);
/// <summary>
///
/// </summary>
/// <param name="attenuation">-99 represents auto[TBR]</param>
[UmsCommand("ISpecAnalyzer.ConfigurePowerLevel")]
void ConfigurePowerLevel(int attenuation);
[UmsCommand("ISpecAnalyzer.IOQuery")]
string IOQuery(string command, int timeout = 10000);
[UmsCommand("ISpecAnalyzer.IOWrite")]
void IOWrite(string command, bool shallWeCheckForError = true);
[UmsCommand("ISpecAnalyzer.MeasurePeakAmplitude")]
double MeasurePeakAmplitude();
[UmsCommand("ISpecAnalyzer.MeasurePeakFrequency")]
double MeasurePeakFrequency();
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.SpecAnalyzer.Contracts</AssemblyName>
<Description>SpecAnalyzer Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.1.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,84 @@
// *******************************************************************************************
// ** **
// ** ISwitch.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;
namespace Raytheon.Instruments
{
/// <summary>
/// ISwitch - base interface to a switch device
/// </summary>
[UmsContract]
public interface ISwitch : IInstrument
{
/// <summary>
/// Connects the specified path.
/// </summary>
/// <param name="path">The path.</param>
[UmsCommand("ISwitch.Connect")]
void Connect(string path);
/// <summary>
/// Disconnects the specified path.
/// </summary>
/// <param name="path">The path.</param>
[UmsCommand("ISwitch.Disconnect")]
void Disconnect(string path);
/// <summary>
/// Disconnects all paths (opens all switches).
/// </summary>
[UmsCommand("ISwitch.DisconnectAll")]
void DisconnectAll();
/// <summary>
/// Gets a value indicating whether this instance is debounced.
/// </summary>
/// <value>
/// <c>true</c> if this instance is debounced; otherwise, <c>false</c>.
/// </value>
bool IsDebounced
{
[UmsCommand("ISwitch.GetIsDebounced")]
get;
}
//*** possible enhancements
//bool CanConnect(string path);
//string[] GetInputChannelNames();
//string[] GetOutputChannelNames();
}
}

View File

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.Switch.Contracts</AssemblyName>
<Description>Standard Switch Instrument Interface</Description>
<OutputType>Library</OutputType>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.6.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,36 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using Raytheon.Communication;
using System;
namespace Raytheon.Instruments
{
/// <summary>
/// This interfaces defines the API for a temperature monitor
/// </summary>
[UmsContract]
public interface ITempMonitor : IInstrument
{
/// <summary>
///
/// </summary>
/// <returns></returns>
[UmsCommand("ITempMonitor.ReadTemperature")]
double ReadTemperature();
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.TempMonitor.Contracts</AssemblyName>
<Description>TempMonitor Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.3.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,83 @@
// UNCLASSIFIED
/*-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------*/
using Raytheon.Communication;
using System;
using System.Runtime.Serialization;
namespace Raytheon.Instruments
{
/// <summary>
/// the format saving video
/// </summary>
[DataContract]
public enum VideoSaveFormat : uint
{
[EnumMember]
BIN,
[EnumMember]
NCDF
};
/// <summary>
/// MOVE - rename the file or change the path on the local system
/// COPY_AND_DELETE - Copy the file and delete the original
/// </summary>
[DataContract]
public enum MoveControl : uint
{
[EnumMember]
MOVE,
[EnumMember]
COPY_AND_DELETE
};
/// <summary>
/// An interface for video recording implementations.
/// </summary>
[UmsContract]
public interface IVideoRecorder : IInstrument
{
[UmsCommand("IVideoRecorder.AddNcdfAttributes")]
void AddNcdfAttributes(string videoFile, string attributeFile);
[UmsCommand("IVideoRecorder.Connect")]
void Connect();
[UmsCommand("IVideoRecorder.Disconnect")]
void Disconnect();
[UmsCommand("IVideoRecorder.GrabVideoToDisk")]
void GrabVideoToDisk(uint numberOfFrames, VideoSaveFormat format);
[UmsCommand("IVideoRecorder.")]
void MoveFile(string fromFile, string toFile, MoveControl control);
[UmsCommand("IVideoRecorder.QueryHardDrive")]
void QueryHardDrive(ref float driveSpace1, ref float driveSpace2, ref float driveSpace3, ref float driveSpace4);
[UmsCommand("IVideoRecorder.ShowLiveVideo")]
void ShowLiveVideo();
[UmsCommand("IVideoRecorder.StopLiveVideo")]
void StopLiveVideo();
[UmsCommand("IVideoRecorder.WaitForGrabToComplete")]
string WaitForGrabToComplete(int timeoutms);
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)Solution.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>Raytheon.Instruments.VideoRecorder.Contracts</AssemblyName>
<Description>VideoRecorder Instrument Interface</Description>
<Product>HAL</Product>
<!-- Static versioning (Suitable for Development) -->
<!-- Disable the line below for dynamic versioning -->
<Version>1.0.4.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raytheon.Instruments.Contracts" Version="1.*" />
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
</ItemGroup>
</Project>