using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Text;
using MindWorks.Nimbus;
using Ivi.Driver;

namespace Raytheon.GuidedElectronicsUnit
{
    public struct Scoreboard
    {
        public Scoreboard(uint status)
        {
            EdaCVClearControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaCVClearControlMessage);
            MtdCarrierEnableMessage = Convert.ToBoolean(status & (uint)BitMask.MtdCarrierEnableMessage);
            KwEchoMessage = Convert.ToBoolean(status & (uint)BitMask.KwEchoMessage);
            KwdlAntennaSelectMessage = Convert.ToBoolean(status & (uint)BitMask.KwdlAntennaSelectMessage);
            KwdlStateControlStatusRequestMessage = Convert.ToBoolean(status & (uint)BitMask.KwdlStateControlStatusRequestMessage);
            KwdlInitializeMessage = Convert.ToBoolean(status & (uint)BitMask.KwdlInitializeMessage);
            EdaCryptoGoControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaCryptoGoControlMessage);
            EdaTerminalIDControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaTerminalIDControlMessage);
            EdaGeneralStatusRequestMessage = Convert.ToBoolean(status & (uint)BitMask.EdaGeneralStatusRequestMessage);
            EdaCVControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaCVControlMessage);
            EdaCVCWControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaCVCWControlMessage);
            EdaTransceiverPowerControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaTransceiverPowerControlMessage);
            EdaDataBusModeControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaDataBusModeControlMessage);
            EdaLowPowerModeControlMessage = Convert.ToBoolean(status & (uint)BitMask.EdaLowPowerModeControlMessage);
        }

        public bool EdaCVClearControlMessage { get; internal set; }

        public bool EdaCVControlMessage { get; internal set; }

        public bool EdaGeneralStatusRequestMessage { get; internal set; }

        public bool EdaTerminalIDControlMessage { get; internal set; }

        public bool EdaCryptoGoControlMessage { get; internal set; }

        public bool KwdlInitializeMessage { get; internal set; }

        public bool KwdlStateControlStatusRequestMessage { get; internal set; }

        public bool KwdlAntennaSelectMessage { get; internal set; }

        public bool KwEchoMessage { get; internal set; }

        public bool MtdCarrierEnableMessage { get; internal set; }

        public bool EdaCVCWControlMessage { get; internal set; }

        public bool EdaTransceiverPowerControlMessage { get; internal set; }

        public bool EdaDataBusModeControlMessage { get; internal set; }

        public bool EdaLowPowerModeControlMessage { get; internal set; }

        internal enum BitMask
        {
            EdaCVClearControlMessage = 0x0000_2000,
            MtdCarrierEnableMessage = 0x0000_1000,
            KwEchoMessage = 0x0000_0800,
            KwdlAntennaSelectMessage = 0x0000_0400,
            KwdlStateControlStatusRequestMessage = 0x0000_0200,
            KwdlInitializeMessage = 0x0000_0100,
            EdaCryptoGoControlMessage = 0x0000_0080,
            EdaTerminalIDControlMessage = 0x0000_0040,
            EdaGeneralStatusRequestMessage = 0x0000_0020,
            EdaCVControlMessage = 0x0000_0010,
            EdaCVCWControlMessage = 0x0000_0008,
            EdaTransceiverPowerControlMessage = 0x0000_0004,
            EdaDataBusModeControlMessage = 0x0000_0002,
            EdaLowPowerModeControlMessage = 0x0000_0001
        }
    }
}