Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
d3561152
Commit
d3561152
authored
Oct 18, 2019
by
Carla Guillen Carias
Browse files
PerSystSqlOperator: implementing metadata query. PerSystSqlConfigurator: small bugfix.
parent
bc6dc415
Changes
2
Hide whitespace changes
Inline
Side-by-side
analytics/operators/persystsql/PerSystSqlConfigurator.cpp
View file @
d3561152
...
...
@@ -135,9 +135,9 @@ void PerSystSqlConfigurator::operatorAttributes(PerSystSqlOperator& op, CFG_VAL
}
else
if
(
boost
::
iequals
(
val
.
first
,
"mariadb_every_x_days"
)){
every_x_days
=
std
::
stoi
(
val
.
second
.
data
());
}
if
(
backend
==
PerSystSqlOperator
::
MARIADB
)
{
op
.
setMariaDBConnection
(
host
,
user
,
password
,
database_name
,
port
,
rotation
,
every_x_days
);
}
}
if
(
backend
==
PerSystSqlOperator
::
MARIADB
)
{
op
.
setMariaDBConnection
(
host
,
user
,
password
,
database_name
,
port
,
rotation
,
every_x_days
);
}
}
...
...
analytics/operators/persystsql/PerSystSqlOperator.cpp
View file @
d3561152
...
...
@@ -127,7 +127,12 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
for
(
const
auto
&
subUnit
:
unit
->
getSubUnits
())
{
// Since we do not clear the internal buffer, all sensor readings will be accumulated in the same vector
for
(
const
auto
&
in
:
subUnit
->
getInputs
())
{
_scaling_factor
=
in
->
getMetadata
()
->
scale
;
if
(
_scaling_factor
==
1
){
SensorMetadata
buffer
;
if
(
_queryEngine
.
queryMetadata
(
in
->
getName
(),
buffer
)){
_scaling_factor
=
buffer
.
scale
;
}
}
if
(
!
_queryEngine
.
querySensor
(
in
->
getName
(),
my_timestamp
,
my_timestamp
,
_buffer
,
false
))
{
LOG
(
debug
)
<<
"PerSystSql Operator "
<<
_name
<<
" cannot read from sensor "
<<
in
->
getName
()
<<
"!"
;
}
...
...
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