示例#1
0
        public void CreatePointTest()
        {
            PIPoint pointDTO = new PIPoint
            {
                Name             = Constants.PIPOINT_CREATE_NAME,
                Descriptor       = "Test for swagger",
                PointClass       = "classic",
                PointType        = "Float32",
                EngineeringUnits = "",
                Step             = false,
                Future           = false
            };

            instance.CreatePoint(webId, pointDTO);

            try
            {
                instance.CreatePoint(webId, pointDTO);
                Assert.IsTrue(false);
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }


            OSIsoft.AF.PI.PIPoint piPoint = null;
            var pointFound = OSIsoft.AF.PI.PIPoint.TryFindPIPoint(StandardPIServer, Constants.PIPOINT_CREATE_NAME, out piPoint);

            Assert.IsTrue(pointFound);
        }
 public void Init()
 {
     base.CommonInit();
     instance = client.Stream;
     point    = GetPIPoint("sinusoid");
     webId    = client.Point.GetByPath(Constants.PI_DATA_SERVER_PATH + @"\sinusoid").WebId;
 }
示例#3
0
        public OSIsoft.AF.PI.PIPoint GetPIPoint(string name)
        {
            OSIsoft.AF.PI.PIPoint piPoint = null;
            var pointFound = OSIsoft.AF.PI.PIPoint.TryFindPIPoint(StandardPIServer, name, out piPoint);

            return(piPoint);
        }
 public void UpdatePIPointData()
 {
     webId = client.Point.GetByPath(Constants.DATA_SERVER_PATH + @"\" + Constants.PIPOINT_CREATE_NAME).WebId;
     point = base.GetPIPoint(Constants.PIPOINT_CREATE_NAME);
 }