public static WorkingContext FindWorkingContext(this ICoreObject ico)
        {
            List <ICoreObject> icoL = new List <ICoreObject>()
            {
                ico
            };

            return(WorkingContext.FindWorkingContextForGivenObjects(icoL) as WorkingContext);
        }
        public static LifelistDetailsQueueProxy GetDetailsQueue(ICoreObject node)
        {
            var queue = Reflector.RunStaticMethodByName(typeof(LifelistNodeDetailsFactory),
                                                        "GetDetailsQueue",
                                                        ReflectionWays.SystemReflection,
                                                        node) as LifelistDetailsQueue;

            return(new LifelistDetailsQueueProxy(queue));
        }
Пример #3
0
        public static IUpload GetPlusBlockConsistencyService(this ICoreObject coreObject)
        {
            IDlc        idlc        = (IDlc)coreObject.Context;
            IDlcManager idlcManager = idlc.WorkingContext.DlcManager;
            PlusBlockConsistencyService PlusBlockConsistencyService = idlcManager.Load("BlockLogic.PlusBlockConsistencyService")
                                                                      as PlusBlockConsistencyService;

            return(PlusBlockConsistencyService);
        }
Пример #4
0
 public object GetStrategyForItem(ICoreObject coreObject, bool throwOnError)
 {
     return(Reflector.RunInstanceMethodByName(
                TSC,
                "GetStrategyForItem",
                ReflectionWays.SystemReflection,
                coreObject,
                throwOnError));
 }
        public ICoreObject GetOnlineObject(
            ICoreObject offlineObject,
            bool initializeState,
            OnlineCreateMode mode)
        {
            ICoreObject ico = OnlineService.GetOnlineObject(offlineObject, initializeState, mode);

            return(ico);
        }
Пример #6
0
 private void AttachCoreObject(ICoreObject coreObject)
 {
     this.DetachCoreObject();
     this.coreObject = coreObject;
     if (this.coreObject != null)
     {
         this.OnCoreObjectAttached();
     }
 }
        public static SystemDataBlockFactory GetSystemDataBlockFactory(this ICoreObject coreObject)
        {
            IDlc                   idlc                   = (IDlc)coreObject.Context;
            IDlcManager            idlcManager            = idlc.WorkingContext.DlcManager;
            SystemDataBlockFactory SystemDataBlockFactory = idlcManager.Load("Siemens.Simatic.HwConfiguration.Basics.SystemData.SystemDataBlockFactory")
                                                            as SystemDataBlockFactory;

            return(SystemDataBlockFactory);
        }
        public static ConnService GetConnService(this ICoreObject coreObject)
        {
            IDlc        idlc        = (IDlc)coreObject.Context;
            IDlcManager idlcManager = idlc.WorkingContext.DlcManager;
            ConnService ConnService = idlcManager.Load("Siemens.Simatic.HwConfiguration.Connections.Block.Base.ConnectionService")
                                      as ConnService;

            return(ConnService);
        }
        public static S7PlusDataUpload GetS7PlusDataUpload(this ICoreObject coreObject)
        {
            IDlc             idlc             = (IDlc)coreObject.Context;
            IDlcManager      idlcManager      = idlc.WorkingContext.DlcManager;
            S7PlusDataUpload S7PlusDataUpload = idlcManager.Load("Siemens.Simatic.HwConfiguration.Basics.SystemData.S7PlusDataUpload")
                                                as S7PlusDataUpload;

            return(S7PlusDataUpload);
        }
Пример #10
0
 public OMSPlusConnectionService GetOMSPlusConnectionService(ICoreObject AccessibleNode,
                                                             CheckConnectionDelegate connectionReady,
                                                             string identifier)
 {
     return(new OMSPlusConnectionService(AccessibleNode,
                                         ((IDlc)AccessibleNode.Context).WorkingContext,
                                         connectionReady,
                                         identifier));
 }
        public static NavigationService GetNavigationService(this ICoreObject coreObject)
        {
            IDlc              idlc              = (IDlc)coreObject.Context;
            IDlcManager       idlcManager       = idlc.WorkingContext.DlcManager;
            NavigationService NavigationService = idlcManager.Load("Siemens.Simatic.HwConfiguration.Diagnostic.NavigationService")
                                                  as NavigationService;

            return(NavigationService);
        }
        public static IElementaryDataTypeService GetDataTypeService(this ICoreObject coreObject)
        {
            IDlc        idlc                    = (IDlc)coreObject.Context;
            IDlcManager idlcManager             = idlc.WorkingContext.DlcManager;
            IElementaryDataTypeService datatype = idlcManager.Load("Siemens.Automation.DomainServices.ElementaryDataTypeService")
                                                  as IElementaryDataTypeService;

            return(datatype);
        }
        public static LifelistProxyFactory GetLifelistProxyFactory(this ICoreObject coreObject)
        {
            IDlc                 idlc                 = (IDlc)coreObject.Context;
            IDlcManager          idlcManager          = idlc.WorkingContext.DlcManager;
            LifelistProxyFactory LifelistProxyFactory = idlcManager.Load("Siemens.Automation.DomainServices.LifelistProxyFactory")
                                                        as LifelistProxyFactory;

            return(LifelistProxyFactory);
        }
        public static PLCMsgConnector GetPLCMsgConnector(this ICoreObject coreObject)
        {
            IDlc            idlc            = (IDlc)coreObject.Context;
            var             idlcManager     = idlc.WorkingContext.DlcManager;
            PLCMsgConnector PLCMsgConnector = idlcManager.Load("Siemens.Simatic.PLCMessaging.PLCMsgConnector")
                                              as PLCMsgConnector;

            return(PLCMsgConnector);
        }
        public static InnovationAlarmService GetInnovationAlarmService(this ICoreObject coreObject)
        {
            IDlc idlc                   = (IDlc)coreObject.Context;
            var  idlcManager            = idlc.WorkingContext.DlcManager;
            var  InnovationAlarmService = idlcManager.Load("Siemens.Simatic.SystemDiagnosis.Comm.AlarmService.InnovationAlarmService")
                                          as InnovationAlarmService;

            return(InnovationAlarmService);
        }
        public static OnlineObjectService GetOnlineObjectService(this ICoreObject coreObject)
        {
            IDlc idlc        = (IDlc)coreObject.Context;
            var  idlcManager = idlc.WorkingContext.DlcManager;
            OnlineObjectService OnlineObjectService = idlcManager.Load(DiagDlcIds.OnlineObjectService)
                                                      as OnlineObjectService;

            return(OnlineObjectService);
        }
        public static OperatingModeObserverService GetOperatingModeObserverService(this ICoreObject coreObject)
        {
            IDlc idlc        = (IDlc)coreObject.Context;
            var  idlcManager = idlc.WorkingContext.DlcManager;
            OperatingModeObserverService OperatingModeObserverService = idlcManager.Load(DiagDlcIds.OperatingModeObserverService)
                                                                        as OperatingModeObserverService;

            return(OperatingModeObserverService);
        }
Пример #18
0
        public static IControllerAlarm GetControllerAlarm(this ICoreObject coreObject)
        {
            IControllerAlarm alarm =
                BusinessLogicConnectorHelper.GetBusinessLogic <IControllerAlarm>(
                    coreObject,
                    "Siemens.Simatic.AlarmServices.AlarmBusinessLogicFactory");

            return(alarm);
        }
        public static TopologyDetection GetTopologyDetection(this ICoreObject coreObject)
        {
            IDlc              idlc              = (IDlc)coreObject.Context;
            IDlcManager       idlcManager       = idlc.WorkingContext.DlcManager;
            TopologyDetection TopologyDetection = idlcManager.Load("Siemens.Simatic.HwConfiguration.Application.TopologyDetection")
                                                  as TopologyDetection;

            return(TopologyDetection);
        }
        public static SdalFacade GetSdalFacade(this ICoreObject coreObject)
        {
            IDlc        idlc        = (IDlc)coreObject.Context;
            IDlcManager idlcManager = idlc.WorkingContext.DlcManager;
            var         SdalFacade  = idlcManager.Load("Siemens.Simatic.SystemDiagnosis.Sdal.SdalPE.SdalFacade")
                                      as SdalFacade;

            return(SdalFacade);
        }
        public static IOnlineService GetOnlineService(this ICoreObject coreObject)
        {
            IDlc           idlc           = (IDlc)coreObject.Context;
            IDlcManager    idlcManager    = idlc.WorkingContext.DlcManager;
            IOnlineService IOnlineService = idlcManager.Load("Siemens.Automation.DomainServices.OnlineService")
                                            as IOnlineService;

            return(IOnlineService);
        }
Пример #22
0
        public static VatFolderSnapInFactory GetVatFolderSnapInFactory(this ICoreObject coreObject)
        {
            IDlc                   idlc                   = (IDlc)coreObject.Context;
            IDlcManager            idlcManager            = idlc.WorkingContext.DlcManager;
            VatFolderSnapInFactory VatFolderSnapInFactory = idlcManager.Load("PlcLanguages.VatService.FolderSnapIn.VatFolderSnapInFactory")
                                                            as VatFolderSnapInFactory;

            return(VatFolderSnapInFactory);
        }
        public static OmsLifelistExtension GetOmsLifelistExtension(this ICoreObject coreObject)
        {
            IDlc                 idlc        = (IDlc)coreObject.Context;
            IDlcManager          idlcManager = idlc.WorkingContext.DlcManager;
            OmsLifelistExtension datatype    = idlcManager.Load("Siemens.Simatic.HwConfiguration.Diagnostic.OmsLifelistExtension")
                                               as OmsLifelistExtension;

            return(datatype);
        }
Пример #24
0
        public static VatFolderSnapInFactory GetStandardFolderBLObjectFactory(this ICoreObject coreObject)
        {
            IDlc                   idlc                   = (IDlc)coreObject.Context;
            IDlcManager            idlcManager            = idlc.WorkingContext.DlcManager;
            VatFolderSnapInFactory VatFolderSnapInFactory = idlcManager.Load("Siemens.Automation.DomainServices.FolderService.StandardFolderBLObjectFactory")
                                                            as VatFolderSnapInFactory;

            return(VatFolderSnapInFactory);
        }
        public static AccessManagerPE GetAccessManagerPE(this ICoreObject coreObject)
        {
            IDlc            idlc        = (IDlc)coreObject.Context;
            IDlcManager     idlcManager = idlc.WorkingContext.DlcManager;
            AccessManagerPE datatype    = idlcManager.Load("Siemens.Simatic.SystemDiagnosis.Sdal.SdalPE.AccessManagerPE")
                                          as AccessManagerPE;

            return(datatype);
        }
        public static DeviceInfoTableController GetDeviceInfoTableController(this ICoreObject coreObject)
        {
            IDlc        idlc        = (IDlc)coreObject.Context;
            IDlcManager idlcManager = idlc.WorkingContext.DlcManager;
            DeviceInfoTableController DeviceInfoTableController = idlcManager.Load("Siemens.Simatic.HwConfiguration.Diagnostic.DeviceInfoTableController")
                                                                  as DeviceInfoTableController;

            return(DeviceInfoTableController);
        }
        public static OnlineHostService GetOnlineHostService(this ICoreObject coreObject)
        {
            IDlc idlc              = (IDlc)coreObject.Context;
            var  idlcManager       = idlc.WorkingContext.DlcManager;
            var  OnlineHostService = idlcManager.Load("Siemens.Simatic.HwConfiguration.Diagnostic.OnlineHostService")
                                     as OnlineHostService;

            return(OnlineHostService);
        }
        public static IOnlineBlockService GetOnlineBlockService(this ICoreObject coreObject)
        {
            IDlc                idlc                = (IDlc)coreObject.Context;
            IDlcManager         idlcManager         = idlc.WorkingContext.DlcManager;
            IOnlineBlockService IOnlineBlockService = idlcManager.Load("PlcLanguages.BlockLogic.OnlineBlockService")
                                                      as IOnlineBlockService;

            return(IOnlineBlockService);
        }
        public static string GetObjectName(this ICoreObject element)
        {
            ICoreAttributes coreAttributes = element.GetAttributeSet(typeof(ICoreAttributes)) as ICoreAttributes;

            if (coreAttributes == null)
            {
                return("");
            }
            return(coreAttributes.Name);
        }
Пример #30
0
        public static int GetProfinetDeviceId(this ICoreObject lifelistNode)
        {
            ILifelistNodeInfo lifelistNodeInfo = lifelistNode.GetAttributeSet(typeof(ILifelistNodeInfo)) as ILifelistNodeInfo;

            if (lifelistNodeInfo != null)
            {
                return(lifelistNodeInfo.PnoIdentifier & ushort.MaxValue);
            }
            return(0);
        }