Examples of IDataPoint


Examples of com.springsource.insight.util.IDataPoint

            assertEquals("Mismatched type for " + keyName, expType, actType);

            List<IDataPoint> dpList = mb.getPoints(keyName);
            assertEquals("Mismatched points size for " + keyName + " - " + dpList, 1, ListUtil.size(dpList));

            IDataPoint dp = dpList.get(0);
            assertEquals("Mismatched timestamp for " + keyName, expValue.getTime(), dp.getTime());

            switch (actType) {
                case COUNTER:
                    assertEquals("Mismatched value for " + keyName, 1.0d, dp.getValue(), 0.000001d);
                    break;

                case GAUGE:
                    assertEquals("Mismatched value for " + keyName, expValue.getValue(), dp.getValue(), 0.000001d);
                    break;

                default:
                    fail("Unknown value type for " + keyName + ": " + actType);
            }
View Full Code Here

Examples of com.springsource.insight.util.IDataPoint

        assertEquals("Mismatched counter type", PointType.COUNTER, mb.getMetricType(metricKey));

        List<IDataPoint> dpList = mb.getPoints(metricKey);
        assertEquals("Mismatched number of points: " + dpList, 1, ListUtil.size(dpList));

        IDataPoint dp = dpList.get(0);
        assertEquals("Mismatched errors count", expectedCount, Math.round(dp.getValue()));

        return mb;
    }
View Full Code Here

Examples of tcg.scada.da.IDataPoint

    CosDpValueStruct value = new CosDpValueStruct();
    value.timestamp = 0;
    value.quality = CosDpQualityEnum.QualityGood;

    // update the value
    IDataPoint dp = null;
    boolean boolValue = false;
    for (int i = 0; i < datapoints.size(); i++)
    {
      dp = datapoints.get(i);
      if (dp == null || dp.getSourceType() != ESourceDataType.TYPE_DI)
      {
        continue;
      }

      // TODO: parse DDI and TDI as well

      boolValue = states[dp.getAddress() - offset];
      value.value.boolValue(boolValue);

      // set the dp value
      if (dp.setSourceValue(value) < 0)
      {
        logger.warn("Can not update source value of datapoint "
            + dp.getName());
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.