summaryrefslogtreecommitdiffstats
path: root/src/hvac-service.hpp
blob: 27bfe1a74c9535349818cdc8da3f564d170ddea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: Apache-2.0

#ifndef _HVAC_SERVICE_HPP
#define _HVAC_SERVICE_HPP

#include "vis-session.hpp"
#include "hvac-can-helper.hpp"
#include "hvac-led-helper.hpp"

class HvacService : public VisSession
{
public:
	HvacService(const VisConfig &config, net::io_context& ioc, ssl::context& ctx);

protected:
	virtual void handle_authorized_response(void) override;

	virtual void handle_get_response(std::string &path, std::string &value, std::string &timestamp) override;

	virtual void handle_notification(std::string &path, std::string &value, std::string &timestamp) override;

private:
	HvacCanHelper m_can_helper;
	HvacLedHelper m_led_helper;

	void set_left_temperature(uint8_t temp);

	void set_right_temperature(uint8_t temp);

	void set_fan_speed(uint8_t temp);
};

#endif // _HVAC_SERVICE_HPP