Examples of PointValueTime


Examples of com.serotonin.m2m2.rt.dataImage.PointValueTime

            Map<String, IDataPointValueSource> context = new HashMap<String, IDataPointValueSource>();
            context.put(PointLinkRT.CONTEXT_VAR_NAME, point);
            int targetDataType = new DataPointDao().getDataPoint(targetPointId).getPointLocator().getDataTypeId();

            try {
                PointValueTime pvt = scriptExecutor.execute(script, context, System.currentTimeMillis(),
                        targetDataType, -1);
                if (pvt.getValue() == null)
                    message = new TranslatableMessage("event.pointLink.nullResult");
                else if (pvt.getTime() == -1)
                    message = new TranslatableMessage("pointLinks.validate.success", pvt.getValue());
                else
                    message = new TranslatableMessage("pointLinks.validate.successTs", pvt.getValue(),
                            Functions.getTime(pvt.getTime()));
            }
            catch (ScriptException e) {
                message = new TranslatableMessage("common.default", e.getMessage());
            }
            catch (ResultTypeException e) {
View Full Code Here

Examples of com.serotonin.m2m2.rt.dataImage.PointValueTime

            Map<String, IDataPointValueSource> context = new HashMap<String, IDataPointValueSource>();
            DataPointRT source = Common.runtimeManager.getDataPoint(vo.getSourcePointId());
            context.put(CONTEXT_VAR_NAME, source);

            try {
                PointValueTime pvt = scriptExecutor.execute(vo.getScript(), context, newValue.getTime(),
                        targetDataType, newValue.getTime());
                if (pvt.getValue() == null) {
                    raiseFailureEvent(newValue.getTime(), new TranslatableMessage("event.pointLink.nullResult"));
                    return;
                }
                newValue = pvt;
            }
View Full Code Here

Examples of com.serotonin.m2m2.rt.dataImage.PointValueTime

            String monitorId = InternalPointLocatorVO.MONITOR_NAMES[locator.getPointLocatorVO().getAttributeId()];
            // They are all integer monitors so far, so this is fine.
            IntegerMonitor m = (IntegerMonitor) Common.MONITORED_VALUES.getValueMonitor(monitorId);
            if (m != null)
                dataPoint.updatePointValue(new PointValueTime((double) m.getValue(), time));
        }
    }
View Full Code Here

Examples of com.serotonin.m2m2.rt.dataImage.PointValueTime

        // Get the data point status from the data image.
        DataPointRT pointRT = Common.runtimeManager.getDataPoint(pointVO.getId());
        if (pointRT == null)
            state.setDisabled(true);
        else {
            PointValueTime pvt = pointRT.getPointValue();
            state.setTime(Functions.getTime(pvt));

            if (pvt != null && pvt.getValue() instanceof ImageValue) {
                // Text renderers don't help here. Create a thumbnail.
                Map<String, Object> model = new HashMap<String, Object>();
                model.put("point", pointVO);
                model.put("pointValue", pvt);
                state.setValue(BaseDwr.generateContent(request, "imageValueThumbnail.jsp", model));
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.