blob: 22edb4d4ce24186a98a5c721dc1fba0cbed384f9 (
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
|
/*
* RemoteSensor.h
*
* Created on: 23 Jul 2019
* Author: David
*/
#ifndef SRC_HEATING_SENSORS_REMOTESENSOR_H_
#define SRC_HEATING_SENSORS_REMOTESENSOR_H_
#include "TemperatureSensor.h"
#if SUPPORT_CAN_EXPANSION
class RemoteSensor : public TemperatureSensor
{
public:
RemoteSensor(unsigned int sensorNum, CanAddress pBoardAddress) noexcept;
GCodeResult Configure(GCodeBuffer& gb, const StringRef& reply) override;
CanAddress GetBoardAddress() const noexcept override { return boardAddress; }
void UpdateRemoteTemperature(CanAddress src, const CanSensorReport& report) noexcept override;
// Try to get a temperature reading
void Poll() noexcept override { } // nothing to do here because reception of CAN messages update the reading
private:
CanAddress boardAddress;
};
#endif
#endif /* SRC_HEATING_SENSORS_REMOTESENSOR_H_ */
|