SysfsSensorGroup.h 910 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/*
 * SysfsSensorGroup.h
 *
 *  Created on: 18.11.2017
 *      Author: Michael Ott (original), Micha Mueller
 */

#ifndef SYSFSSENSORGROUP_H_
#define SYSFSSENSORGROUP_H_

#include "SysfsSensorBase.h"
12
#include "../../includes/SensorGroupTemplate.h"
13
14
15
16
17

class SysfsSensorGroup : public SensorGroupTemplate<SysfsSensorBase> {

public:
	SysfsSensorGroup(const std::string& name);
18
	SysfsSensorGroup(const SysfsSensorGroup& other);
19
	virtual ~SysfsSensorGroup();
20
	SysfsSensorGroup& operator=(const SysfsSensorGroup& other);
21
22
23
24

	void start()	override;
	void stop()		override;

25
26
27
28
29
	void setPath(const std::string& path)	{ _path = path; }
//	void setFile(FILE* file)				{ _file = file; }
//	const std::string&	getPath()	const { return _path; }
//	FILE* 				getFile()	const { return _file; }

30
31
32
33
private:
	void read()			override;
	void readAsync()	override;

34
35
	std::string _path;
	FILE* 		_file;
36
37
38
};

#endif /* SYSFSSENSORGROUP_H_ */