Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
af94a593
Commit
af94a593
authored
Feb 13, 2020
by
Michael Ott
Browse files
Set _readingQueue size to 3000 for xccDatastorePower sensors
parent
5688d117
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/include/sensorbase.h
View file @
af94a593
...
...
@@ -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)
...
...
dcdbpusher/sensors/ipmi/IPMISensorBase.h
View file @
af94a593
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment