MCPcopy Create free account
hub / github.com/UtilitechAS/amsreader-firmware / setup

Method setup

lib/PriceService/src/PricesContainer.cpp:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13void PricesContainer::setup(uint8_t resolutionInMinutes, uint8_t numberOfPoints, bool differentExportPrices) {
14 this->resolutionInMinutes = resolutionInMinutes;
15 this->differentExportPrices = differentExportPrices;
16 this->numberOfPoints = numberOfPoints;
17 this->points = new int32_t[numberOfPoints * (differentExportPrices ? 2 : 1)];
18 memset(this->points, PRICE_NO_VALUE * 10000, numberOfPoints * (differentExportPrices ? 2 : 1) * sizeof(int32_t));
19}
20
21char* PricesContainer::getSource() {
22 return this->source;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected