/// <summary> /// Initialises an archive template /// </summary> /// <param name="archiveName">Name of the archive</param> /// <param name="type">Type of the archive can be one of: AVERAGE, MIN, MAX or LAST</param> /// <param name="xFactor">Percentage of readings that can be absent before a datum is considered invalid</param> /// <param name="readingsPerDataPoint">Number of readings that are processed to make a single datum</param> /// <param name="maxDataPoints">Maximum number of data points that can be stored in the archive</param> public ArchiveTemplate(string archiveName, ConsolidationFunctionType consolidationFunction, int xFactor, int readingsPerDataPoint, int numDataPointsPerArchive) { this.Name = archiveName; this.ConsolidationFunction = consolidationFunction; this.XFactor = xFactor; this.ReadingsPerDataPoint = readingsPerDataPoint; this.MaxDataPoints = numDataPointsPerArchive; }
private void FixupFromDto(ArchiveTemplateDto dto) { this.dao = dto.Dao; this.name = dto.Name; this.maxDataPoints = dto.MaxDataPoints; this.numReadingsPerDataPoint = dto.ReadingsPerDataPoint; this.consolidationFunction = (ConsolidationFunctionType)dto.ConsolidationFunction; this.xFactor = dto.XFactor; }