// Copyright Doug Lewis, 2018 All Rights Reserved

using System;

namespace DAQ
{

    public enum daqRecState
    {
        OFF,
        CONNECT,
        RECORD,
        STOP,
        SLEEP,
        PLAYBACK
    };

   

    public class DaqCal
    {
        public double[] ma = new double[8];
        public UInt32[] b = new UInt32[8];
    }

    public class PressureSensorData
    {
        public double [] pressure = new double[23];
        public double[] voltage = new double[23];
    }

    public enum recordMode
    {
        flashOnly,
        flashAndEnet
    };
    public enum quadsEnabled
    {
        QuadA,
        QuadB,
        QuadC,
        QuadD,
    }
    public enum BBBInterface

    {
        Ethernet,
        USB
    }
    public class DaqState
    {
        public daqRecState state;
        public recordMode record;
        public BBBInterface BeagleInterface;
        public quadsEnabled quads;
        public bool testEnabled = false;
        public int numBlocks = 1000;


        public DaqState()
        {
            state = daqRecState.OFF;
            BeagleInterface = BBBInterface.Ethernet;
            record = recordMode.flashAndEnet;
            quads = quadsEnabled.QuadB;
        }
    }

    public class DAQControlConfigSettings
    {
        public string ZeroVFileName ;
        public string FiveVFileName ;
        public string calFileName ;
        public string playBackFileName ;
        public string USBAddress;
        public string EthAddress;
        public string pSensor1FileName1 ;
        public string pSensor1FileName2;
        public string pSensor1FileName3 ;
        public string pSensor1FileName4 ;
        public string pSensorJSONFile;

        public string pSensor1JSONFile;
        public string pSensor2JSONFile;
        public string pSensor3JSONFile;
        public string pSensor4JSONFile;

        public DAQControlConfigSettings()
        {
            ZeroVFileName = @"C:/ERPS/DAQ1_CAL/0VCal_10292018192151.bin";
            FiveVFileName = @"C:/ERPS/DAQ1_CAL/5VCal_10292018192746.bin";
            calFileName = @"C:/ERPS/DAQ1_CAL/DaqCal.json";
            playBackFileName = @"C:/ERPS/DAQ1_CAL/0VCal_10292018192151.bin";
            pSensor1FileName1 = @"C:/ERPS/Data/PressureSensor1Dat.txt";
            pSensor1FileName2 = @"C:/ERPS/Data/PressureSensor2Dat.txt";
            pSensor1FileName3 = @"C:/ERPS/Data/PressureSensor3Dat.txt";
            pSensor1FileName4 = @"C:/ERPS/Data/PressureSensor4Dat.txt";
            pSensorJSONFile = @"C:/ERPS/Data/SensorData.json";

            pSensor1JSONFile = @"C:/ERPS/DAQ1_CAL/PressureSensor1.json";
            pSensor2JSONFile = @"C:/ERPS/DAQ1_CAL/PressureSensor2.json";
            pSensor3JSONFile = @"C:/ERPS/DAQ1_CAL/PressureSensor3.json";
            pSensor4JSONFile = @"C:/ERPS/DAQ1_CAL/PressureSensor4.json";

            USBAddress = "192.168.7.2";
            EthAddress = "192.168.8.2";
        }
    }

}