Commit af94a593 authored by Michael Ott's avatar Michael Ott

Set _readingQueue size to 3000 for xccDatastorePower sensors

parent 5688d117
......@@ -154,7 +154,7 @@ public:
void clearReadingQueue() const { reading_t buf; while(_readingQueue->pop(buf)) {} }
void pushReadingQueue(reading_t *reads, std::size_t count) const { _readingQueue->push(reads, count); }
void initSensor(unsigned interval) {
virtual void initSensor(unsigned interval) {
uint64_t cacheSize = _cacheInterval / interval + 1;
if(!_cache) {
//TODO: have all time-related configuration parameters use the same unit (e.g. milliseconds)
......
......@@ -95,6 +95,13 @@ class IPMISensorBase : public SensorBase {
xccBulkEnergy
};
void initSensor(unsigned interval) override {
if (_type == xccDatastorePower) {
_readingQueue.reset(new boost::lockfree::spsc_queue<reading_t>(3000));
}
SensorBase::initSensor(interval);
}
uint16_t getRecordId() const { return _recordId; }
const std::vector<uint8_t> &getSdrRecord() const { return _sdrRecord; }
double getFactor() const { return _factor; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment