use of com.serotonin.m2m2.vo.template.DataPointPropertiesTemplateDefinition in project ma-core-public by infiniteautomation.
the class TemplateDwr method getNewDataPointTemplate.
/**
* Get a new Data Point Template
* @return
*/
@DwrPermission(user = true)
public ProcessResult getNewDataPointTemplate() {
ProcessResult response = new ProcessResult();
DataPointPropertiesTemplateVO vo = new DataPointPropertiesTemplateVO();
vo.setDefinition(new DataPointPropertiesTemplateDefinition());
response.addData("vo", vo);
return response;
}
use of com.serotonin.m2m2.vo.template.DataPointPropertiesTemplateDefinition in project ma-core-public by infiniteautomation.
the class DefaultDataPointPropertiesTemplateFactory method createDefaultBinaryTemplate.
protected DataPointPropertiesTemplateVO createDefaultBinaryTemplate() {
DataPointPropertiesTemplateVO defaultBinaryPointTemplate = new DataPointPropertiesTemplateVO();
defaultBinaryPointTemplate.setXid(BINARY_XID);
defaultBinaryPointTemplate.setName("Binary");
defaultBinaryPointTemplate.setDataTypeId(DataTypes.BINARY);
defaultBinaryPointTemplate.setDefaultTemplate(true);
defaultBinaryPointTemplate.setDefinition(new DataPointPropertiesTemplateDefinition());
defaultBinaryPointTemplate.setChartColour("");
defaultBinaryPointTemplate.setPlotType(PlotTypes.STEP);
defaultBinaryPointTemplate.setLoggingType(LoggingTypes.ON_CHANGE);
defaultBinaryPointTemplate.setDefaultCacheSize(1);
BinaryTextRenderer binaryRenderer = new BinaryTextRenderer();
binaryRenderer.setOneColour("black");
binaryRenderer.setOneLabel("one");
binaryRenderer.setZeroColour("blue");
binaryRenderer.setZeroLabel("zero");
defaultBinaryPointTemplate.setTextRenderer(binaryRenderer);
TableChartRenderer binaryChartRenderer = new TableChartRenderer();
binaryChartRenderer.setLimit(10);
defaultBinaryPointTemplate.setChartRenderer(binaryChartRenderer);
return defaultBinaryPointTemplate;
}
use of com.serotonin.m2m2.vo.template.DataPointPropertiesTemplateDefinition in project ma-core-public by infiniteautomation.
the class DefaultDataPointPropertiesTemplateFactory method createDefaultNumericTemplate.
protected DataPointPropertiesTemplateVO createDefaultNumericTemplate() {
DataPointPropertiesTemplateVO defaultNumericPointTemplate = new DataPointPropertiesTemplateVO();
defaultNumericPointTemplate.setXid(NUMERIC_XID);
defaultNumericPointTemplate.setName("Numeric");
defaultNumericPointTemplate.setDefaultTemplate(true);
defaultNumericPointTemplate.setDataTypeId(DataTypes.NUMERIC);
defaultNumericPointTemplate.setDefinition(new DataPointPropertiesTemplateDefinition());
defaultNumericPointTemplate.setChartColour("");
defaultNumericPointTemplate.setPlotType(PlotTypes.SPLINE);
defaultNumericPointTemplate.setLoggingType(LoggingTypes.INTERVAL);
defaultNumericPointTemplate.setIntervalLoggingPeriod(1);
defaultNumericPointTemplate.setIntervalLoggingPeriodType(TimePeriods.MINUTES);
defaultNumericPointTemplate.setIntervalLoggingType(IntervalLoggingTypes.AVERAGE);
defaultNumericPointTemplate.setDefaultCacheSize(1);
AnalogRenderer numericTextRenderer = new AnalogRenderer();
numericTextRenderer.setFormat("0.00");
defaultNumericPointTemplate.setTextRenderer(numericTextRenderer);
ImageChartRenderer numericChartRenderer = new ImageChartRenderer();
numericChartRenderer.setTimePeriod(TimePeriods.DAYS);
numericChartRenderer.setNumberOfPeriods(1);
defaultNumericPointTemplate.setChartRenderer(numericChartRenderer);
return defaultNumericPointTemplate;
}
use of com.serotonin.m2m2.vo.template.DataPointPropertiesTemplateDefinition in project ma-core-public by infiniteautomation.
the class DefaultDataPointPropertiesTemplateFactory method createDefaultAlphanumericTemplate.
protected DataPointPropertiesTemplateVO createDefaultAlphanumericTemplate() {
DataPointPropertiesTemplateVO defaultAlphanumericPointTemplate = new DataPointPropertiesTemplateVO();
defaultAlphanumericPointTemplate.setXid(ALPHANUMERIC_XID);
defaultAlphanumericPointTemplate.setName("Alphanumeric");
defaultAlphanumericPointTemplate.setDataTypeId(DataTypes.ALPHANUMERIC);
defaultAlphanumericPointTemplate.setDefaultTemplate(true);
defaultAlphanumericPointTemplate.setDefinition(new DataPointPropertiesTemplateDefinition());
defaultAlphanumericPointTemplate.setChartColour("");
defaultAlphanumericPointTemplate.setPlotType(PlotTypes.STEP);
defaultAlphanumericPointTemplate.setLoggingType(LoggingTypes.ON_CHANGE);
defaultAlphanumericPointTemplate.setDefaultCacheSize(1);
defaultAlphanumericPointTemplate.setTextRenderer(new PlainRenderer());
TableChartRenderer alphaChartRenderer = new TableChartRenderer();
alphaChartRenderer.setLimit(10);
defaultAlphanumericPointTemplate.setChartRenderer(alphaChartRenderer);
return defaultAlphanumericPointTemplate;
}
use of com.serotonin.m2m2.vo.template.DataPointPropertiesTemplateDefinition in project ma-core-public by infiniteautomation.
the class DefaultDataPointPropertiesTemplateFactory method createDefaultMultistateTemplate.
protected DataPointPropertiesTemplateVO createDefaultMultistateTemplate() {
DataPointPropertiesTemplateVO defaultMultistatePointTemplate = new DataPointPropertiesTemplateVO();
defaultMultistatePointTemplate.setXid(MULTISTATE_XID);
defaultMultistatePointTemplate.setName("Multistate");
defaultMultistatePointTemplate.setDataTypeId(DataTypes.MULTISTATE);
defaultMultistatePointTemplate.setDefaultTemplate(true);
defaultMultistatePointTemplate.setDefinition(new DataPointPropertiesTemplateDefinition());
defaultMultistatePointTemplate.setChartColour("");
defaultMultistatePointTemplate.setPlotType(PlotTypes.STEP);
defaultMultistatePointTemplate.setLoggingType(LoggingTypes.ON_CHANGE);
defaultMultistatePointTemplate.setDefaultCacheSize(1);
defaultMultistatePointTemplate.setTextRenderer(new PlainRenderer());
TableChartRenderer multistateChartRenderer = new TableChartRenderer();
multistateChartRenderer.setLimit(10);
defaultMultistatePointTemplate.setChartRenderer(multistateChartRenderer);
return defaultMultistatePointTemplate;
}
Aggregations