コード例 #1
0
ファイル: cbus.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
 public void Update(cbus element)
 {
     if (element.m_cid.HasValue == true)
     {
         this.cid = element.cid;
     }
     if (element.m_commandack.HasValue == true)
     {
         this.commandack = element.commandack;
     }
     if (element.m_fastclock.HasValue == true)
     {
         this.fastclock = element.fastclock;
     }
     if (element.m_fcaddr.HasValue == true)
     {
         this.fcaddr = element.fcaddr;
     }
     if (element.m_fcnode.HasValue == true)
     {
         this.fcnode = element.fcnode;
     }
     if (element.m_fonfof.HasValue == true)
     {
         this.fonfof = element.fonfof;
     }
     if (element.m_loadertime.HasValue == true)
     {
         this.loadertime = element.loadertime;
     }
     if (element.m_purgetime.HasValue == true)
     {
         this.purgetime = element.purgetime;
     }
     if (element.m_shortevents.HasValue == true)
     {
         this.shortevents = element.shortevents;
     }
     if (element.m_slotserver.HasValue == true)
     {
         this.slotserver = element.slotserver;
     }
     if (element.m_sodaddr.HasValue == true)
     {
         this.sodaddr = element.sodaddr;
     }
     this.cbnodelist = element.cbnodelist;
 }
コード例 #2
0
ファイル: cbus.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
        public static cbus Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            cbus _cbus = new cbus();

            _cbus.m_rocrailClient = rocrailClient;
            _cbus.m_cid           = (int?)xml.Attribute("cid");
            _cbus.m_commandack    = (bool?)xml.Attribute("commandack");
            _cbus.m_fastclock     = (bool?)xml.Attribute("fastclock");
            _cbus.m_fcaddr        = (int?)xml.Attribute("fcaddr");
            _cbus.m_fcnode        = (int?)xml.Attribute("fcnode");
            _cbus.m_fonfof        = (bool?)xml.Attribute("fonfof");
            _cbus.m_loadertime    = (int?)xml.Attribute("loadertime");
            _cbus.m_purgetime     = (int?)xml.Attribute("purgetime");
            _cbus.m_shortevents   = (bool?)xml.Attribute("shortevents");
            _cbus.m_slotserver    = (bool?)xml.Attribute("slotserver");
            _cbus.m_sodaddr       = (int?)xml.Attribute("sodaddr");
            Definitions.Tools.ParseList <cbnode>(_cbus.m_cbnodelist, xml, "cbnode", cbnode.Parse, rocrailClient);
            return(_cbus);
        }