Exemplo n.º 1
0
        public void KeepAlive(ProductionRefreshInfo refreshInfo)
        {
            _lastRefresh = GlobalTimer.Elapsed;

            Logger.Info("facility enabler received. " + refreshInfo + " " + _facility);

            _facility.SetConnected(refreshInfo.isConnected);

            if (refreshInfo.enable)
            {
                _level      = refreshInfo.level;
                _pbsNodeEid = refreshInfo.senderPBSEid;
                _facility.OnPBSStartFacility();
                _isEnabled = true; //fontos a vegen, mert csak akkor nyilik ki ha elotte csukva volt!!!
                _facility.SendFacilityInfo();
            }
            else
            {
                _level      = 0;
                _pbsNodeEid = 0;
                _facility.OnPBSStopFacility();
                _isEnabled = false; //fontos a vegen, mert akkor zarodik be ha nyitva volt!!!
                _facility.SendFacilityInfo();
            }
        }
Exemplo n.º 2
0
        public void ProcessConnectionInfo(ProductionRefreshInfo refreshInfo)
        {
            _facility.SetConnected(refreshInfo.isConnected);
            Logger.Info("facility connection changed. base:" + refreshInfo.targetPBSBaseEid + " enabler node:" + refreshInfo.senderPBSEid + (refreshInfo.isConnected ? " CON+++" : " DIS---"));

            _facility.SendFacilityInfo();
        }
Exemplo n.º 3
0
        public void AddPBSBase(ProductionRefreshInfo refreshData)
        {
            //load facilities from sql, add them to cache
            var baseEid = refreshData.targetPBSBaseEid;

            ProductionProcessor.AddPBSDockingBase(baseEid);
        }
Exemplo n.º 4
0
        public void RemovePBSBase(ProductionRefreshInfo refreshData)
        {
            //remove all prod facility and related stuff from caches, sqlt intezi a pbs ondead, mindent torol, lootosit
            var baseEid = refreshData.targetPBSBaseEid;

            ProductionProcessor.RemovePBSDockingBase(baseEid);
        }
Exemplo n.º 5
0
        public void PBSFacilityConnected(ProductionRefreshInfo refreshData)
        {
            ProductionProcessor.GetFacility(refreshData.targetPBSBaseEid, refreshData.facilityType, out ProductionFacility productionFacility).ThrowIfError();

            var pbsFacility = productionFacility as IPBSProductionFacility;

            pbsFacility?.ProcessConnectionInfo(refreshData);
        }
Exemplo n.º 6
0
 public void ProcessConnectionInfo(ProductionRefreshInfo refreshInfo)
 {
     _pbsProductionFacilityHelper.ProcessConnectionInfo(refreshInfo);
 }
Exemplo n.º 7
0
 public void ProcessInfo(ProductionRefreshInfo refreshInfo)
 {
     _pbsProductionFacilityHelper.KeepAlive(refreshInfo);
 }