Пример #1
0
        /// <summary>
        /// Checks the display FW Version
        /// </summary>
        //  Revision History
        //  MM/DD/YY Who Version ID Number Description
        //  -------- --- ------- -- ------ -------------------------------------------
        //  09/17/09 RCG 2.30.00           Created
        //  09/23/14 jrf 4.00.63 WR 534158 Modified way test details are set.
        private void CheckDisplayFWVersion()
        {
            // Only check this value if it's HW 2.0 or later and earlier than HW 3.0
            if (VersionChecker.CompareTo(m_AmiDevice.HWRevision, CENTRON_AMI.HW_VERSION_2_0) >= 0 &&
                VersionChecker.CompareTo(m_AmiDevice.HWRevision, CENTRON_AMI.HW_VERSION_3_0) < 0)
            {
                XMLOpenWayActiveFiles ActiveFiles = new XMLOpenWayActiveFiles();
                FirmwareSet           MeterFWSet  = ActiveFiles.GetFirmwareSet(FirmwareSet.DetermineMeterType(m_AmiDevice.DeviceClass,
                                                                                                              m_AmiDevice.HWRevision, m_AmiDevice.MeterKey_TransparentDeviceSupported));

                string MeterValue    = m_AmiDevice.DisplayModVer + "." + m_AmiDevice.DisplayModBuild;
                string ExpectedValue = "";
                string Result        = "";
                string Details       = "";
                string Reason        = "";

                if (MeterFWSet != null && File.Exists(FW_PATH + MeterFWSet.DisplayFWFile))
                {
                    CENTRON_AMI_FW_File FWFile = new CENTRON_AMI_FW_File(FW_PATH + MeterFWSet.DisplayFWFile);
                    ExpectedValue = FWFile.CompleteVersion;
                }
                else
                {
                    Reason = TestResources.ReasonNoFirmwareFile;
                }

                // Get the result string. We skip if the expected value is empty string. Pass if the values are equal
                Result = GetResultString(String.IsNullOrEmpty(ExpectedValue), MeterValue.Equals(ExpectedValue));

                Details = GetFWVersionDetails(MeterValue, ExpectedValue);

                AddTestDetail(TestResources.DisplayFirmwareVersion, Result, Details, Reason);
            }
        }
Пример #2
0
        /// <summary>
        /// Checks the Register FW version
        /// </summary>
        //  Revision History
        //  MM/DD/YY Who Version ID Number Description
        //  -------- --- ------- -- ------ -------------------------------------------
        //  09/17/09 RCG 2.30.00           Created
        //  09/23/14 jrf 4.00.63 WR 534158 Modified way test details are set.
        private void CheckRegisterFWVersion()
        {
            XMLOpenWayActiveFiles ActiveFiles = new XMLOpenWayActiveFiles();
            FirmwareSet           MeterFWSet  = ActiveFiles.GetFirmwareSet(FirmwareSet.DetermineMeterType(m_AmiDevice.DeviceClass,
                                                                                                          m_AmiDevice.HWRevision, m_AmiDevice.MeterKey_TransparentDeviceSupported));

            string MeterValue = m_AmiDevice.FWRevision.ToString("F3", CultureInfo.CurrentCulture)
                                + "." + m_AmiDevice.FirmwareBuild.ToString("d3", CultureInfo.CurrentCulture);
            string ExpectedValue = "";
            string Result        = "";
            string Details       = "";
            string Reason        = "";

            if (MeterFWSet != null && File.Exists(FW_PATH + MeterFWSet.RegisterFWFile))
            {
                CENTRON_AMI_FW_File FWFile = new CENTRON_AMI_FW_File(FW_PATH + MeterFWSet.RegisterFWFile);
                ExpectedValue = FWFile.CompleteVersion;
            }
            else
            {
                Reason = TestResources.ReasonNoFirmwareFile;
            }

            // Get the result string. We skip if the expected value is empty string. Pass if the values are equal
            Result = GetResultString(String.IsNullOrEmpty(ExpectedValue), MeterValue.Equals(ExpectedValue));

            Details = GetFWVersionDetails(MeterValue, ExpectedValue);

            AddTestDetail(TestResources.RegisterFirmwareVersion, Result, Details, Reason);
        }
Пример #3
0
        /// <summary>
        /// Checks the RFLAN FW Version
        /// </summary>
        //  Revision History
        //  MM/DD/YY Who Version ID Number Description
        //  -------- --- ------- -- ------ -------------------------------------------
        //  09/17/09 RCG 2.30.00           Created
        //  09/23/14 jrf 4.00.63 WR 534158 Modified way test details are set.
        //  11/03/14 jrf 4.00.84 WR 542970 Making sure correct type of comm module firmware version is checked.
        private void CheckRFLANFWVersion()
        {
            XMLOpenWayActiveFiles ActiveFiles = new XMLOpenWayActiveFiles();
            FirmwareSet           MeterFWSet  = ActiveFiles.GetFirmwareSet(FirmwareSet.DetermineMeterType(m_AmiDevice.DeviceClass,
                                                                                                          m_AmiDevice.HWRevision, m_AmiDevice.MeterKey_TransparentDeviceSupported));

            string MeterValue    = m_AmiDevice.CommModVer + "." + m_AmiDevice.CommModBuild;
            string ExpectedValue = "";
            string Result        = "";
            string Details       = "";
            string Reason        = "";
            string FileName      = "";

            if (MeterFWSet != null)
            {
                //Determine which comm module firmware type we are looking for.
                switch (m_AmiDevice.CommModuleDeviceClass)
                {
                case CommModuleBase.ITR2_DEVICE_CLASS:
                {
                    string strCommModuleID = null;

                    try
                    {
                        if (null != m_AmiDevice.CommModule)
                        {
                            strCommModuleID = m_AmiDevice.CommModule.CommModuleIdentification;
                        }
                    }
                    catch (PSEMException)
                    {
                        // This read may fail on some meters whose Comm Module is down
                    }

                    if (String.CompareOrdinal(strCommModuleID, CG_MESH_MODULE) == 0)
                    {
                        FileName = MeterFWSet.CiscoCommFWFile;
                    }
                    else if (m_AmiDevice is IBridge &&
                             ((IBridge)m_AmiDevice).CurrentRegisterCommOpMode == OpenWayMFGTable2428.ChoiceConnectCommOpMode.ChoiceConnectOperationalMode)
                    {
                        MeterValue = ((IBridge)m_AmiDevice).ChoiceConnectFWVerRev + "." + ((IBridge)m_AmiDevice).ChoiceConnectFWBuild;

                        FileName = MeterFWSet.ChoiceConnectFWFile;
                    }
                    else
                    {
                        FileName = MeterFWSet.LANFWFile;
                    }
                    break;
                }

                case CommModuleBase.ITRL_DEVICE_CLASS:
                {
                    FileName = MeterFWSet.LANFWFile;
                    break;
                }

                case CommModuleBase.ITRP_DEVICE_CLASS:
                {
                    FileName = MeterFWSet.PLANFWFile;
                    break;
                }

                case CENTRON_AMI.ITRH_DEVICE_CLASS:
                case CENTRON_AMI.ITRU_DEVICE_CLASS:
                case CENTRON_AMI.ITRV_DEVICE_CLASS:
                {
                    FileName = MeterFWSet.ICSFWFile;
                    break;
                }

                case CENTRON_AMI.ITRS_DEVICE_CLASS:
                {
                    FileName = MeterFWSet.CiscoCommFWFile;
                    break;
                }

                default:
                {
                    FileName = MeterFWSet.LANFWFile;
                    break;
                }
                }

                if (File.Exists(FW_PATH + FileName))
                {
                    CENTRON_AMI_FW_File FWFile = new CENTRON_AMI_FW_File(FW_PATH + FileName);
                    ExpectedValue = FWFile.CompleteVersion;
                }
                else
                {
                    Reason = TestResources.ReasonNoFirmwareFile;
                }
            }

            // Get the result string. We skip if the expected value is empty string. Pass if the values are equal
            Result = GetResultString(String.IsNullOrEmpty(ExpectedValue), MeterValue.Equals(ExpectedValue));

            Details = GetFWVersionDetails(MeterValue, ExpectedValue);

            AddTestDetail(TestResources.RFLANFirmwareVersion, Result, Details, Reason);
        }