#pragma once

using stMaintParameters = struct _stMaintParameters
{
    int iRunSeqNo{ -1 };
    int iModuleNo{ -1 };
    // for motor and output
    int iMotorOrOutput{ -1 };
    // for motor
    int    iPos{ -2 };
    double dPos{ 0. };
    int    iSpd{ -1 };
    // for motor and output
    bool bOnOff{ false };
};

using stMaintRunParameters = struct _stMaintRunParameters
{
    int iRunSeqNo{ -1 };
    int iModuleNo{ -1 };
    // for motor and output
    int iMotor{ -1 };
    int iOutput{ -1 };
    // for motor
    int    iPos{ -2 };
    double dPos{ 0. };
    int    iSpd{ -1 };
    // for motor and output
    bool bMtrOnOff{ false };
    bool bOutputOnOff{ false };
};

using stMaintState = struct _stMaintState
{
    bool bHmMtr{ false };         // true = Home Motor in maintenance mode
    bool bMoveMtr{ false };       // true = Move motor to position in maintenance mode
    bool bStopMtr{ false };       // true = Stop Motor in maintenance mode
    bool bTriggerOutput{ false }; // true = Trigger output in maintenance mode
    bool bOnOffMtr{ false };      // true = On/Off Motor in maintenance mode
    // intermediate state
    bool bCheckHmMtrComplete{ false };   // true = check motor home move complete
    bool bCheckMoveMtrComplete{ false }; // true = check motor move complete
};