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>