Esempio n. 1
0
        private static MavLink Deserialize(XDocument xDocument)
        {
            XElement mavLinkElement = xDocument.Element(XName.Get("mavlink"));

            Xml.MavLink mavLink = ToMavLink(mavLinkElement);
            return(mavLink);
        }
Esempio n. 2
0
        public Data.MavLink GetMavLink(string path)
        {
            Xml.MavLink xMavLink = XmlSerializer.Deserialize(path);

            Data.MavLink dMavLink = new Data.MavLink();
            dMavLink.Version = xMavLink.Version;
            dMavLink.Dialect = xMavLink.Dialect;
            IEnumerable <Data.Enum> enums = ToModels(xMavLink.Enums).ToList();

            dMavLink.Enums = enums;

            dMavLink.Messages = ToModels(xMavLink.Messages).ToList();

            return(dMavLink);
        }