// ******************************************************************************************
// **                                                                                       **
// **      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;
        }
    }
}
