LOG(warning)<<_groupName<<" "<<group->getGroupName()<<" could not be read! Omitting";
}
}
}
for(autog:_sensorGroups){
if(isEntityOfGroup(sEntity,*g)){
finalizeEntityGroup(sEntity,*g);
}
}
returntrue;
}
...
...
@@ -351,7 +387,7 @@ protected:
* Pure virtual interface method, responsible for reading plugin-specific sensor
* base values.
*
* @param sBase The sensor base for which to set the values
* @param s The sensor base for which to set the values
* @param config A boost property (sub-)tree containing the sensor values
*/
virtualvoidsensorBase(SBase&s,CFG_VALconfig)=0;
...
...
@@ -360,7 +396,7 @@ protected:
* Pure virtual interface method, responsible for reading plugin-specific sensor
* group values.
*
* @param sGroup The sensor group for which to set the values
* @param s The sensor group for which to set the values
* @param config A boost property (sub-)tree containing the group values
*/
virtualvoidsensorGroup(SGroup&s,CFG_VALconfig)=0;
...
...
@@ -369,7 +405,7 @@ protected:
* Virtual interface method, responsible for reading plugin-specific sensor
* entity values.
*
* @param sEntity The sensor entity for which to set the values
* @param s The sensor entity for which to set the values
* @param config A boost property (sub-)tree containing the entity values
*/
virtualvoidsensorEntity(SEntity&s,CFG_VALconfig){
...
...
@@ -377,6 +413,44 @@ protected:
LOG(warning)<<"Method sensorEntity called, but was not overwritten! Either you have unwanted entitys in your config file or forgot to overwrite this method";
}
/**
* Check if e is the corresponding entity of g
*
* @param e
* @param g
*
* @return True if (g.entity == &e)
*/
//TODO not very convenient for writing plugins. Are there better solutions?
virtualboolisEntityOfGroup(SEntity&e,SGroup&g){
//Overwrite if necessary
LOG(warning)<<"Method isEntityOfGroup called, but was not overwritten! Either you have unwanted entitys in your config file or forgot to overwrite this method";
returnfalse;
}
/**
* Sets e as entity for group g
*
* @param e
* @param g
*/
//TODO not very convenient for writing plugins. Are there better solutions?
virtualvoidsetEntityForGroup(SEntity&e,SGroup&g){
//Overwrite if necessary
LOG(warning)<<"Method setEntityForGroup called, but was not overwritten! Either you have unwanted entitys in your config file or forgot to overwrite this method";
}
/**
* Finalize the group g with everything it needs from its entity (set e.g. the mqttPart for entity)
*
* @param g
*/
//TODO not very convenient for writing plugins. Are there better solutions?
virtualvoidfinalizeGroup(SGroup&g){
//Overwrite if necessary
LOG(warning)<<"Method finalizeEntityGroup called, but was not overwritten! Either you have unwanted entitys in your config file or forgot to overwrite this method";
}
/**
* Virtual interface method, responsible for reading plugin-specific global values.