namespace DB_Proxima;

public class PM : GeneralDB
{
    public PM(Guid guid, DateTime dateTime)
    {
        this.UID = guid;
        this.Time = dateTime;
    }
    public APC? APC { get; set; }
    public Shutter? Shutter { get; set; }
    public APCVATGV? APCVATGV { get; set; }
    public LeakCheck? LeakCheck { get; set; }
    public BoatElevatorServo? BoatElevatorServo { get; set; }
    public BoatRotationServo? BoatRotationServo { get; set; }
    public Recipe? RecipeInfo { get; set; }
    public BufferServo? BufferServo { get; set; }

    //FS VG PG PS
    public DataCollection<float>? ValueSensor { get; set; }
    //Sensor.. 
    public DataCollection<bool>? StatusSensor { get; set; }
    public DataCollection<float>? AOValue { get; set; }
    public DataCollection<FFU>? FFU { get; set; }
    public DataCollection<MFC>? MFC { get; set; }
    public DataCollection<BufferFoup>? BufferFoup { get; set; }
    // ..Enable
    public DataCollection<PairValue<bool>>? AVValve { get; set; }

    public DataCollection<PairValue<float>>? GaslineHeater { get; set; }
}

public class APC : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool IsError { get; set; }
    public float HomingStatus { get; set; }
    public float Interlock1 { get; set; }
    public float Interlock2 { get; set; }
    public float Interlock3 { get; set; }
    public float InterlockConstantOfInterlock3 { get; set; }
    public float ModeFeedback { get; set; }
    public float ModeSetPoint { get; set; }
    public float P1SensorOffsetSetting { get; set; }
    public float PositionFeedback { get; set; }
    public float PositionSetPoint { get; set; }
    public float PosMonOffsetSetting { get; set; }
    public float Pressure1Feedback { get; set; }
    public float Pressure2Feedback { get; set; }
    public float PressureSetPoint { get; set; }
    public float SelectedControllerFeedback { get; set; }
    public float SlowRateSetPoint { get; set; }
    public float SlowVacuumModeSetting { get; set; }
    public float ValveStatusThreshold { get; set; }
}

public class APCVATGV : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool IsError { get; set; }
    public float InterlockConstantOfInterlock3 { get; set; }
    public float ModeSetPoint { get; set; }
    public float P1SensorOffsetSetting { get; set; }
    public float PositionFeedback { get; set; }
    public float PositionSetPoint { get; set; }
    public float PosMonOffsetSetting { get; set; }
    public float Pressure1Feedback { get; set; }
    public float Pressure2Feedback { get; set; }
    public float PressureSetPoint { get; set; }
    public float SlowRateSetPoint { get; set; }
    public float SlowVacuumModeSetting { get; set; }
    public float ValveStatusThreshold { get; set; }
}

public class Recipe : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool IsError { get; set; }
    public bool IsExecuteSubRecipe { get; set; }
    public bool IsInMaintainMode { get; set; }
    public bool IsLooping { get; set; }
    public bool IsOnline { get; set; }
    public bool IsProcessing { get; set; }

    public float DG1 { get; set; }
    public float MP21_PS { get; set; }
    public float NewShowTime { get; set; }
    public bool RecipeHold { get; set; }
    public bool RecipeHolded { get; set; }
    public float RecipeHoldTime { get; set; }
    public float RecipeStepElapseTime { get; set; }
    public float RecipeStepNumber { get; set; }
    public float RecipeStepTime { get; set; }
    public float RecipeTotalElapseTime { get; set; }
    public float RecipeTotalTime { get; set; }
    public bool RecipeWait { get; set; }
    public float SubRecipeCurrentLoopCount { get; set; }
    public float SubRecipeLoopCount { get; set; }
}

public class BoatElevatorServo : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool AtHomePosition { get; set; }
    public bool AtPosition1 { get; set; }
    public bool AtPosition2 { get; set; }
    public bool AtPosition3 { get; set; }
    public float CurrentPosition { get; set; }
    public float CurrentSpeed { get; set; }
    public bool IsAlarm { get; set; }
    public bool IsMoving { get; set; }
    public bool IsReady { get; set; }
    public bool IsServoOn { get; set; }
    public float TargetPosition { get; set; }
    public float TargetPositionFb { get; set; }
}

public class BoatRotationServo : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool AtHomePosition { get; set; }
    public float CurrentSpeed { get; set; }
    public bool IsAlarm { get; set; }
    public bool IsHomeDone { get; set; }
    public bool IsHoming { get; set; }
    public bool IsMoving { get; set; }
    public bool IsReady { get; set; }
}

public class BufferServo : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float CurrentPosition { get; set; }
    public float CurrentSpeed { get; set; }
    public float CurrentTorque { get; set; }
    public bool IsAlarm { get; set; }
    public bool IsInPosition { get; set; }
    public bool IsMotorRun { get; set; }
    public bool IsReady { get; set; }
    public bool IsServoOn { get; set; }
    public bool IsServoOnBufferAxis { get; set; }
    public float TargetPosition { get; set; }
}

public class LeakCheck : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float LeakCheckActualLeak { get; set; }
    public float LeakCheckBasePressure { get; set; }
    public float LeakCheckBasePressureLimit { get; set; }
    public float LeakCheckCheckTime { get; set; }
    public float LeakCheckDelayElapseTime { get; set; }
    public float LeakCheckDelayMonitorPressure { get; set; }
    public float LeakCheckDelayStartPressure { get; set; }
    public float LeakCheckDelayTime { get; set; }
    public float LeakCheckElapseTime { get; set; }
    public float LeakCheckHighLimit { get; set; }
    public float LeakCheckLeakLimit { get; set; }
    public float LeakCheckLowLimit { get; set; }
    public float LeakCheckMonitorPressure { get; set; }
    public float LeakCheckRetryCurrentCount { get; set; }
    public float LeakCheckRetryLimit { get; set; }
    public float LeakCheckStartPressure { get; set; }

}

public class Shutter : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool DiClose { get; set; }
    public bool DiOpen { get; set; }
    public bool DoClose { get; set; }
    public bool DoOpen { get; set; }
}


public class BufferFoup : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float N2Flow { get; set; }
    public float N2Pressure { get; set; }
}

public class FFU : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float? CurrentSpeed { get; set; }
    public bool? IsSwitch { get; set; }
    public float? SetSpeed { get; set; }
}

public class MFC : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float Feedback { get; set; }
    public float LastSetPoint { get; set; }
    public float MFCUnitEnum { get; set; }
}

public class GaslineHeater : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public float TempFeedback { get; set; }
    public float TempSetPoint { get; set; }
}

public class IoValve : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool Status { get; set; }
    public bool SetPoint { get; set; }
}


public class AvValue : IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }
    public bool Feedback { get; set; }
    public bool SetPoint { get; set; }
    public bool VirtualStatus { get; set; }
}

public interface IBasicInfo
{
    public Guid UID { get; set; }
    public DateTime Time { get; set; }
    public string? Name { get; set; }

}