Commit 64cdead1 authored by Micha Müller's avatar Micha Müller
Browse files

Minor fix to configurators

parent 7a67c75b
......@@ -483,6 +483,13 @@ protected:
}
}
//read in values inherited from EntityInterface
BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config) {
if (boost::iequals(val.first, "mqttPart")) {
sEntity.setMqttPart(val.second.data());
}
}
sensorEntity(sEntity, config);
BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config) {
......
......@@ -91,7 +91,7 @@ public:
return *this;
}
//TODO check if getHostName() aliases are still required after refactor
//TODO refactor getEntityName -> getName()
///@name Getters
///@{
const std::string& getEntityName() const { return _name; }
......
......@@ -55,7 +55,7 @@ void BACnetConfigurator::sensorGroup(BACnetSensorGroup& s, CFG_VAL config) {
}
void BACnetConfigurator::global(CFG_VAL config) {
_bacClient = std::make_shared<BACnetClient>();
_bacClient = std::make_shared<BACnetClient>("BACnetClient");
std::string address_cache, interface;
unsigned port = 47808, timeout = 1000, apdu_timeout = 200, apdu_retries = 0;
......
......@@ -72,14 +72,12 @@ void IPMIConfigurator::sensorGroup(IPMISensorGroup& s, CFG_VAL config) {
}
void IPMIConfigurator::sensorEntity(IPMIHost& s, CFG_VAL config) {
s.setHostName(config.data());
s.setSessionTimeout(_globalHost.sessionTimeout);
s.setRetransmissionTimeout(_globalHost.retransmissionTimeout);
s.setCache(_tempdir);
ADD {
ATTRIBUTE("username", setUserName);
ATTRIBUTE("password", setPassword);
ATTRIBUTE("mqttPart", setMqttPart);
ATTRIBUTE("cipher", setCipher);
ATTRIBUTE("ipmiVersion", setIpmiVersion);
}
......
......@@ -52,6 +52,5 @@ void PDUConfigurator::sensorGroup(PDUSensorGroup& s, CFG_VAL config) {
void PDUConfigurator::sensorEntity(PDUUnit& s, CFG_VAL config) {
ADD {
ATTRIBUTE("host", setHost);
//TODO add support for mqttPart if required
}
}
......@@ -65,6 +65,5 @@ void SNMPConfigurator::sensorEntity(SNMPConnection& s, CFG_VAL config) {
ATTRIBUTE("PrivProto", setPrivProto);
ATTRIBUTE("AuthKey", setAuthKey);
ATTRIBUTE("PrivKey", setPrivKey);
ATTRIBUTE("MqttPart", setMqttPart);
}
}
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