SNMPConfigurator.h 996 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * SNMPConfigurator.h
 *
 *  Created on: 05.07.2018
 *      Author: Axel Auweter (original), Micha Mueller
 */

#ifndef SNMPCONFIGURATOR_H_
#define SNMPCONFIGURATOR_H_

#include "SNMPSensor.h"
#include "SNMPConnection.h"

Micha Mueller's avatar
Micha Mueller committed
14
#include <list>
15

16
17
18
#include "../../ConfiguratorTemplate.h"

class SNMPConfigurator : public ConfiguratorTemplate<SNMPSensor> {
19

Micha Mueller's avatar
Micha Mueller committed
20
	typedef std::list<SNMPConnection> connectionList_t;
21
22
23
24
25

public:
	SNMPConfigurator();
	virtual ~SNMPConfigurator();

26
27
protected:
	bool derivedReadConfig(boost::property_tree::iptree& cfg) final;
28

29
	void derivedReReadConfig() final;
30

31
32
33
	void derivedSetGlobalSettings(const pluginSettings_t& pluginSettings) final {/*nothing to overwrite*/}

	bool derivedReadSensor(SNMPSensor& sensor, boost::property_tree::iptree& config) final;
34

35
private:
Micha Mueller's avatar
Micha Mueller committed
36
	connectionList_t	_connections;
37
38
};

39
extern "C" ConfiguratorInterface* create() {
40
41
42
	return new SNMPConfigurator;
}

43
extern "C" void destroy(ConfiguratorInterface* c) {
44
45
46
47
	delete c;
}

#endif /* SNMPCONFIGURATOR_H_ */