Commit 9c92d372 authored by Micha Mueller's avatar Micha Mueller
Browse files

Further fixes and improvements

parent 7cc73e39
......@@ -328,16 +328,6 @@ public:
//prints plugin specific configurator attributes and entities if present
printConfiguratorConfig(ll);
/*
LOG_VAR(ll) << " Entities (" << _entityName << "):";
if (_sensorEntitys.size() != 0) {
for(auto e : _sensorEntitys) {
e->printConfig();
}
} else {
LOG_VAR(ll) << " No entities for this plugin";
}*/
LOG_VAR(ll) << " Groups:";
for(auto g : _sensorGroups) {
g->SensorGroupInterface::printConfig(ll);
......@@ -633,7 +623,6 @@ protected:
if (_mqttPrefix[_mqttPrefix.length()-1] != '/') {
_mqttPrefix.append("/");
}
LOG(debug) << " Using own MQTT-Prefix " << _mqttPrefix;
} else if (boost::iequals(global.first, "cacheInterval")) {
_cacheInterval = stoul(global.second.data());
_cacheInterval *= 1000;
......
......@@ -288,9 +288,10 @@ public:
static std::string formatName(const std::string& name, int cpuID=-1) {return cpuID<0 ? name : "cpu" + std::to_string(cpuID) + "." + name;}
virtual void printConfig(LOG_LEVEL ll, LOGGER& lg) {
LOG_VAR(ll) << " Sensor " << _name;
LOG_VAR(ll) << " Sensor: " << _name;
LOG_VAR(ll) << " MQTT Topic: " << _mqtt;
LOG_VAR(ll) << " sink: " << getSinkPath();
LOG_VAR(ll) << " subSampling: " << getSubsampling();
if(_skipConstVal) {
LOG_VAR(ll) << " Skipping constant values";
} else {
......
......@@ -81,7 +81,7 @@ public:
}
virtual void printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << " Sensor Group " << _groupName;
LOG_VAR(ll) << " Sensor Group: " << _groupName;
if (_mqttPart != "") {
LOG_VAR(ll) << " MQTT part: " << _mqttPart;
}
......
......@@ -73,7 +73,7 @@ void BACnetConfigurator::global(CFG_VAL config) {
}
void BACnetConfigurator::printConfiguratorConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << " Not other plugin specific general attributes";
LOG_VAR(ll) << " No other plugin specific general attributes";
if (_bacClient) {
_bacClient->printConfig(ll);
......
......@@ -31,17 +31,6 @@ void BACnetSensorGroup::init(boost::asio::io_service& io) {
SensorGroupTemplate::init(io);
if(_bacClient) {
_bacClient->initializeStrand(io);
#ifdef DEBUG
LOG(debug) << " DeviceInstance: " << _deviceInstance;
LOG(debug) << " " << _sensors.size() << " Sensors:";
for(const auto& s : _sensors) {
LOG(debug) << " " << s->getName();
LOG(debug) << " ObjectInstance: " << s->getObjectInstance();
LOG(debug) << " ObjectType: " << s->getObjectType();
LOG(debug) << " PropertyId: " << s->getPropertyId();
}
#endif
} else {
LOG(error) << "No BACnetClient set for sensor " << _groupName << "! Cannot initialize sensor.";
}
......
......@@ -30,7 +30,7 @@ public:
void setDeviceInstance(const std::string& deviceInstance) { _deviceInstance = stoul(deviceInstance); }
uint32_t getDeviceInstance() const { return _deviceInstance; }
void printConfig(LOG_LEVEL ll);
void printConfig(LOG_LEVEL ll) override;
private:
void read() override;
......
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