PDUSensorGroup.h 972 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * PDUSensorGroup.h
 *
 *  Created on: 24.02.2018
 *      Author: Micha Mueller
 */

#ifndef SRC_SENSORS_PDU_PDUSENSORGROUP_H_
#define SRC_SENSORS_PDU_PDUSENSORGROUP_H_

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

class PDUSensorGroup: public SensorGroupTemplate<PDUSensorBase> {

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

	void init(boost::asio::io_service& io) override;
	void start()	override;
	void stop()		override;

26
27
28
29
30
	void setRequest(const std::string& request) { _request = request; }
	void setPdu(PDUUnit* pdu) 					{ _pdu = pdu; }

	const std::string& getRequest()	{ return _request; }
	PDUUnit* const getPdu() const 	{ return _pdu; }
31
32
33
34
35

private:
	void read()			override;
	void readAsync()	override;

36
	std::string	_request;
37
38
39
40
	PDUUnit* _pdu;
};

#endif /* SRC_SENSORS_PDU_PDUSENSORGROUP_H_ */