PDUSensor.h 621 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/*
 * PDUSensor.h
 *
 *  Created on: 24.02.2018
 *      Author: Micha Mueller
 */

#ifndef SRC_SENSORS_PDU_PDUSENSOR_H_
#define SRC_SENSORS_PDU_PDUSENSOR_H_

#include "../../Sensor.h"
12
#include "PDUUnit.h"
13
14
15
16
17
18
19

class PDUSensor: public Sensor {

public:
	PDUSensor(const std::string& name);
	virtual ~PDUSensor();

20
21
22
23
24
25
26
27
	void setPdu(PDUUnit* pdu) {
		_pdu = pdu;
	}

	PDUUnit* getPdu() const {
		return _pdu;
	}

28
29
	void init(boost::asio::io_service& io);

30
31
	void read();
	void readAsync();
32
33
	void startPolling();
	void stopPolling();
34

35
36
	xmlPathVector_t	_xmlPath;

37
private:
38
39

	PDUUnit* _pdu;
40
41
42
};

#endif /* SRC_SENSORS_PDU_PDUSENSOR_H_ */