-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMessage.h
36 lines (31 loc) · 968 Bytes
/
Message.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
/*
* Copyright © 2017-2024 Matt Robinson
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include <cstdint>
#include <climits>
#include <map>
#include <string>
#include <vector>
class Message
{
protected:
std::map<std::string, std::string> values;
std::string SpecialDataConv5(uint64_t data);
std::string SpecialDataConv6(uint8_t data);
std::string FormatNumber(
int value, float scale, int min = INT_MIN, int max = INT_MAX,
const std::string &minText = {}, const std::string &maxText = {}
);
std::string NoYesCodeString(uint8_t value);
std::string StatusCodeString(uint8_t value);
std::string LockingCodeString(uint8_t value);
std::string BlockingCodeString(uint8_t value);
std::string OffOnCodeString(uint8_t value);
std::string OpenClosedCodeString(uint8_t value);
std::string ClosedOpenCodeString(uint8_t value);
public:
std::map<std::string, std::string> getValues();
};