Exemple #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ECUMetaData(AvailableDevices ad)
 {
     availableDevices = ad;
     isBase = false;
     ident = new ECUIdentifier();
     ExposedRomTables = new Dictionary<string, TableMetaData>();
     ExposedRamTables = new Dictionary<string, TableMetaData>();
     BaseRomTables = new Dictionary<string, TableMetaData>();
     BaseRamTables = new Dictionary<string, TableMetaData>();
     ScalingList = new Dictionary<string,Scaling>();
     inheritList = new List<ECUMetaData>();
 }
Exemple #2
0
        /// <summary>
        /// Read the rom identification header and include from a file
        /// </summary>
        /// <param name="fetchPath"></param>
        /// <returns></returns>
        public void ParseMetaData_ECUFlash()
        {
            try
            {
                XDocument xmlDoc = XDocument.Load(filePath, LoadOptions.PreserveWhitespace);
                XElement xRomId = xmlDoc.XPathSelectElement("/rom/romid");
                ident = new ECUIdentifier();
                string incl;

                if (xmlDoc.XPathSelectElement("/rom/include") != null)
                    incl = xmlDoc.XPathSelectElement("/rom/include").Value.ToString();
                else
                {
                    incl = null;
                    isBase = true;
                }

                ident.ParseEcuFlashXml(xRomId, incl);
            }
            catch (Exception e)
            {
                Trace.TraceWarning("Error parsing definition metadata for {0}.",filePath);
                Trace.TraceError(e.Message);
                Trace.TraceError(e.StackTrace);
            }
        }