TesterSensorGroup.h 939 Bytes
Newer Older
Alessio Netti's avatar
Alessio Netti committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * TesterSensorGroup.h
 *
 *  Created on: 20.12.2018
 *      Author: Alessio Netti
 */

#ifndef TESTERSENSORGROUP_H_
#define TESTERSENSORGROUP_H_

#include "TesterSensorBase.h"
#include "../../includes/SensorGroupTemplate.h"

class TesterSensorGroup : public SensorGroupTemplate<TesterSensorBase> {

public:
	TesterSensorGroup(const std::string& name);
Alessio Netti's avatar
Alessio Netti committed
18
	TesterSensorGroup& operator=(const TesterSensorGroup& other);
Alessio Netti's avatar
Alessio Netti committed
19
20
21
22
23
	virtual ~TesterSensorGroup();

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

24
25
26
27
28
	void setValue(long long n)              { _value = n; }
	void setNumSensors(unsigned int n)      { _numSensors = n; }

    long long getValue()              { return _value; }
    unsigned int getNumSensors()      { return _numSensors; }
Alessio Netti's avatar
Alessio Netti committed
29

30
31
    void printConfig(LOG_LEVEL ll) override;

Alessio Netti's avatar
Alessio Netti committed
32
33
34
35
private:
	void read()			override;
	void readAsync()	override;

36
37
	long long    _value;
    unsigned int _numSensors;
Alessio Netti's avatar
Alessio Netti committed
38
39
40
};

#endif /* TESTERSENSORGROUP_H_ */