예제 #1
0
        public string GetTargetIP()
        {
            ThrowExceptionIfVeriStandIsNotLaunched();
            ThrowExceptionIfProjectIsNotOpened();
            //SystemState state;
            string sysdef;
            //string[] targetsArray;

            //WorkSpace.GetSystemState(out state, out sysdef, out targetsArray);

            SystemDefinition projDef = new SystemDefinition(this.projectPath);

            BaseNode[] projBaseNode = projDef.Root.FindChildrenByGUID("3a41ca74-36ec-4aff-9219-9d05c8f91208");

            string projDirectoryName = Path.GetDirectoryName(this.projectPath);

            sysdef = projDirectoryName + "\\" + projBaseNode[0].Name;

            string value = "";

            SystemDefinition sysDef  = new SystemDefinition(sysdef);
            Targets          targets = sysDef.Root.GetTargets();
            Target           target  = targets.GetTargetList()[0];

            value = target.IPAddress;

            //ErrChk(this.WorkSpace.GetSingleChannelValue(channelIdentidier, out value));

            return(value);
        }
예제 #2
0
        public double GetTargetRate()
        {
            ThrowExceptionIfVeriStandIsNotLaunched();
            ThrowExceptionIfProjectIsNotOpened();
            SystemState state;
            string      sysdef;

            string[] targetsArray;

            WorkSpace.GetSystemState(out state, out sysdef, out targetsArray);

            double value = double.NaN;

            SystemDefinition sysDef  = new SystemDefinition(sysdef);
            Targets          targets = sysDef.Root.GetTargets();
            Target           target  = targets.GetTargetList()[0];

            value = target.TargetRate;

            //ErrChk(this.WorkSpace.GetSingleChannelValue(channelIdentidier, out value));

            return(value);
        }