-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathleafobcharger.h
More file actions
33 lines (25 loc) · 854 Bytes
/
leafobcharger.h
File metadata and controls
33 lines (25 loc) · 854 Bytes
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
#ifndef LEAFOBCHARGER_H
#define LEAFOBCHARGER_H
#include "canbusnode.h"
#include "canmessageutils.h"
class LeafOBCharger : public CanBusNode
{
Q_OBJECT
Q_PROPERTY(quint32 outputPower READ outputPower NOTIFY outputPowerChanged)
Q_PROPERTY(quint32 maxOutputPower READ maxOutputPower NOTIFY maxOutputPowerChanged)
public:
LeafOBCharger(QCanBusDevice* canBusDevice, quint32 frameId, QObject* parent = nullptr);
~LeafOBCharger() = default;
quint32 outputPower() const;
quint32 maxOutputPower() const;
Q_SIGNALS:
void outputPowerChanged(quint32 outputPower);
void maxOutputPowerChanged(quint32 maxOutputPower);
protected:
void receiveFrame(const QByteArray& data) override;
private:
QHash<quint32, CanMessageUtils::Fields> m_fields;
quint32 m_outputPower = 0;
quint32 m_maxOutputPower = 0;
};
#endif