-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatmessage.h
56 lines (46 loc) · 1.5 KB
/
datmessage.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef DATMESSAGE_HPP_INCLUDED
#define DATMESSAGE_HPP_INCLUDED
#include "message.h"
#include <QMetaType>
#include <stdint.h>
class DatMessage : public Message {
public:
using Message::Message;
/*
DatMessage();
DatMessage(char* buffer, int16_t len);
DatMessage(const DatMessage &other);
~DatMessage();
*/
uint16_t getCounter() const;
uint8_t getSlotId() const;
std::string getSlotIdStr() const;
uint8_t getChemistry() const;
std::string getChemistryStr() const;
uint8_t getProgramState() const;
std::string getProgramStateStr() const;
uint8_t getProgram() const;
std::string getProgramStr() const;
std::string programAsString(uint8_t program) const;
uint8_t getStep() const;
std::string getStepStr() const;
uint16_t getMinutes() const;
std::string getTimerStr() const;
uint16_t getVoltage() const; // in units of 0.001
std::string getVoltageStr() const;
uint16_t getCurrent() const; // in units of 0.001
std::string getCurrentStr() const;
uint32_t getChargeCap() const; // in units of 0.01
std::string getChargeCapStr() const;
uint32_t getDischargeCap() const; // in units of 0.01
std::string getDischargeCapStr() const;
uint8_t getMaxCharge() const;
uint8_t getPause() const;
uint16_t getCapacity() const;
uint8_t getDischarge() const;
uint16_t getCrc() const;
void print() const;
void printSummary() const;
};
Q_DECLARE_METATYPE(DatMessage);
#endif // DATMESSAGE_HPP_INCLUDED