Exemple #1
0
 public void Update(bidibnode element)
 {
     if (element.m_analogcnt.HasValue == true)
     {
         this.analogcnt = element.analogcnt;
     }
     if (element.m_class != null)
     {
         this.@class = element.@class;
     }
     if (element.m_classmnemonic != null)
     {
         this.classmnemonic = element.classmnemonic;
     }
     if (element.m_inputcnt.HasValue == true)
     {
         this.inputcnt = element.inputcnt;
     }
     if (element.m_lportcnt.HasValue == true)
     {
         this.lportcnt = element.lportcnt;
     }
     if (element.m_motorcnt.HasValue == true)
     {
         this.motorcnt = element.motorcnt;
     }
     if (element.m_path != null)
     {
         this.path = element.path;
     }
     if (element.m_sensorcnt.HasValue == true)
     {
         this.sensorcnt = element.sensorcnt;
     }
     if (element.m_servocnt.HasValue == true)
     {
         this.servocnt = element.servocnt;
     }
     if (element.m_soundcnt.HasValue == true)
     {
         this.soundcnt = element.soundcnt;
     }
     if (element.m_sportcnt.HasValue == true)
     {
         this.sportcnt = element.sportcnt;
     }
     if (element.m_uid.HasValue == true)
     {
         this.uid = element.uid;
     }
     if (element.m_vendor.HasValue == true)
     {
         this.vendor = element.vendor;
     }
     if (element.m_version != null)
     {
         this.version = element.version;
     }
 }
Exemple #2
0
        public static bidibnode Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            bidibnode _bidibnode = new bidibnode();

            _bidibnode.m_rocrailClient = rocrailClient;
            _bidibnode.m_analogcnt     = (int?)xml.Attribute("analogcnt");
            _bidibnode.m_class         = (string)xml.Attribute("class");
            _bidibnode.m_classmnemonic = (string)xml.Attribute("classmnemonic");
            _bidibnode.m_inputcnt      = (int?)xml.Attribute("inputcnt");
            _bidibnode.m_lportcnt      = (int?)xml.Attribute("lportcnt");
            _bidibnode.m_motorcnt      = (int?)xml.Attribute("motorcnt");
            _bidibnode.m_path          = (string)xml.Attribute("path");
            _bidibnode.m_sensorcnt     = (int?)xml.Attribute("sensorcnt");
            _bidibnode.m_servocnt      = (int?)xml.Attribute("servocnt");
            _bidibnode.m_soundcnt      = (int?)xml.Attribute("soundcnt");
            _bidibnode.m_sportcnt      = (int?)xml.Attribute("sportcnt");
            _bidibnode.m_uid           = (int?)xml.Attribute("uid");
            _bidibnode.m_vendor        = (int?)xml.Attribute("vendor");
            _bidibnode.m_version       = (string)xml.Attribute("version");
            return(_bidibnode);
        }