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