IPMIConfigurator.h 1.38 KB
Newer Older
1
2
3
4
/*
 * IPMIConfigurator.h
 *
 *  Created on: 26 Jan 2017
5
 *      Author: Michael Ott (original), Micha Mueller
6
7
8
9
10
 */

#ifndef IPMICONFIGURATOR_H_
#define IPMICONFIGURATOR_H_

11
#include "../../includes/ConfiguratorTemplate.h"
12

13
14
#include "IPMIHost.h"
#include "IPMISensorGroup.h"
15

16
class IPMIConfigurator: public ConfiguratorTemplate<IPMISensorBase, IPMISensorGroup, IPMIHost> {
17

18
19
20
21
22
	typedef struct {
		uint32_t sessionTimeout;
		uint32_t retransmissionTimeout;
	} globalHost_t;

23
24
25
public:
	IPMIConfigurator();
	virtual ~IPMIConfigurator();
26

27
protected:
28
29
30
31
32
33
34
35
36
37
38
	/* Overwritten from ConfiguratorTemplate */
	void sensorBase(IPMISensorBase& s, CFG_VAL config) override;
	void sensorGroup(IPMISensorGroup& s, CFG_VAL config) override;
	void sensorEntity(IPMIHost& s, CFG_VAL config) override;

	bool isEntityOfGroup(IPMIHost& e, IPMISensorGroup& g) override;
	void setEntityForGroup(IPMIHost& e, IPMISensorGroup& g) override;
	void finalizeGroup(IPMISensorGroup& g) override;

	void global(CFG_VAL config) override;

39
	void derivedSetGlobalSettings(const pluginSettings_t& pluginSettings) override { _tempdir = pluginSettings.tempdir; }
40

Micha Mueller's avatar
Micha Mueller committed
41
42
	void printConfiguratorConfig(LOG_LEVEL ll) override;

43
44
45
46
private:
	std::string _tempdir;
	globalHost_t _globalHost;
};
47

48
extern "C" ConfiguratorInterface* create() {
49
	return new IPMIConfigurator;
50
51
}

52
extern "C" void destroy(ConfiguratorInterface* c) {
53
54
55
56
	delete c;
}

#endif /* IPMICONFIGURATOR_H_ */