Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
b98bdff6
Commit
b98bdff6
authored
Oct 15, 2019
by
Alessio Netti
Browse files
Sensor metadata is not de-allocated anymore after auto-publish
parent
a8baafa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
collectagent/analyticscontroller.cpp
View file @
b98bdff6
...
...
@@ -112,18 +112,7 @@ void AnalyticsController::run() {
publishSensors
();
vector
<
op_dl_t
>&
_analyticsPlugins
=
_manager
->
getPlugins
();
// De-allocating metadata for all sensors - after auto-publish it is not needed anymore
for
(
auto
&
p
:
_analyticsPlugins
)
for
(
auto
&
op
:
p
.
configurator
->
getOperators
())
{
for
(
auto
&
u
:
op
->
getUnits
())
{
for
(
auto
&
s
:
u
->
getBaseOutputs
())
s
->
clearMetadata
();
for
(
auto
&
s
:
u
->
getBaseInputs
())
s
->
clearMetadata
();
}
op
->
releaseUnits
();
}
DCDB
::
SensorId
sid
;
list
<
DCDB
::
SensorDataStoreReading
>
readings
;
boost
::
lockfree
::
spsc_queue
<
reading_t
>
*
sensorQueue
;
...
...
dcdbpusher/MQTTPusher.cpp
View file @
b98bdff6
...
...
@@ -98,27 +98,7 @@ void MQTTPusher::push() {
//Performing auto-publish if necessary
sendMappings
();
// De-allocating metadata for all sensors - after auto-publish it is not needed anymore
for
(
auto
&
p
:
_plugins
)
{
for
(
auto
&
g
:
p
.
configurator
->
getSensorGroups
())
{
for
(
auto
&
s
:
g
->
acquireSensors
())
{
s
->
clearMetadata
();
}
g
->
releaseSensors
();
}
}
for
(
auto
&
p
:
_operatorPlugins
)
for
(
auto
&
op
:
p
.
configurator
->
getOperators
())
{
for
(
auto
&
u
:
op
->
getUnits
())
{
for
(
auto
&
s
:
u
->
getBaseOutputs
())
s
->
clearMetadata
();
for
(
auto
&
s
:
u
->
getBaseInputs
())
s
->
clearMetadata
();
}
op
->
releaseUnits
();
}
computeMsgRate
();
//collect sensor-data
reading_t
*
reads
=
new
reading_t
[
SensorBase
::
QUEUE_MAXLIMIT
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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