Exemplo n.º 1
0
        //-------------------------------------------------------------------------------------------------//
        public EquipmentEngine(string rootFilePath)
            : base(rootFilePath)
        {
            const string STRLOG_MethodName = "EquipmentEngine";

            Logfile.WriteCalled(null, STRLOG_MethodName);

            try
            {
                //
                // Create an instance of the RedLion class
                //
                this.redLion = new RedLion(this.xmlNodeEquipmentConfig);

                //
                // Check the minimum initialise delay and update if necessary
                //
                //int initialiseDelay = this.redLion.InitialiseDelay;
                //if (initialiseDelay > this.InitialiseDelay)
                //{
                //    this.InitialiseDelay = initialiseDelay;
                //    Logfile.Write(STRLOG_InitialiseDelay + initialiseDelay.ToString() + STRLOG_Seconds);
                //}

                //
                // Get the delay in seconds to wait before taking a measurement
                //
                int measurementDelay = XmlUtilities.GetIntValue(this.xmlNodeEquipmentConfig, Consts.STRXML_measurementDelay);
                if (measurementDelay < 1)
                {
                    throw new Exception(STRERR_NumberIsInvalid);
                }
                Logfile.Write(STRLOG_MeasurementDelay + measurementDelay.ToString());

                this.redLion.MeasurementDelay = measurementDelay;
            }
            catch (Exception ex)
            {
                //
                // Log the message and throw the exception back to the caller
                //
                Logfile.WriteError(ex.Message);
                throw;
            }

            Logfile.WriteCompleted(null, STRLOG_MethodName);
        }
Exemplo n.º 2
0
 //-------------------------------------------------------------------------------------------------//
 public int GetStopACDriveTime(RedLion.ACDriveModes acDriveMode)
 {
     return this.redLion.GetStopACDriveTime(acDriveMode);
 }
Exemplo n.º 3
0
 //-------------------------------------------------------------------------------------------------//
 public int GetStartDCDriveMutTime(RedLion.DCDriveMutModes dcDriveMutMode)
 {
     return this.redLion.GetStartDCDriveMutTime(dcDriveMutMode);
 }