SysfsConfigurator.h 966 Bytes
Newer Older
1
/*
2
 * SysfsConfigurator.h
3
4
5
6
7
 *
 *  Created on: 18.11.2017
 *      Author: Micha Mueller
 */

8
9
#ifndef SYSFSCONFIGURATOR_H_
#define SYSFSCONFIGURATOR_H_
10

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

13
14
15
#include "SysfsSingleSensor.h"

class SysfsConfigurator : public ConfiguratorTemplate<SysfsSensorBase, SysfsSingleSensor> {
16
17
18
19
20

public:
	SysfsConfigurator();
	virtual ~SysfsConfigurator();

21
22
23
protected:
	/* Overwritten from ConfiguratorTemplate */
	bool derivedReadConfig(boost::property_tree::iptree& cfg) override;
24
25
26
	void derivedReReadConfig() override { /* nothing to overwrite */ }
	void derivedSetGlobalSettings(const pluginSettings_t& pluginSettings) override { /* nothing to overwrite */ }
	bool derivedReadSensorBase(SysfsSensorBase& sensor, boost::property_tree::iptree& config) override;
27
28
};

29
extern "C" ConfiguratorInterface* create() {
30
31
32
	return new SysfsConfigurator;
}

33
extern "C" void destroy(ConfiguratorInterface* c) {
34
35
36
	delete c;
}

37
#endif /* SYSFSCONFIGURATOR_H_ */