printConfig.h
1 #pragma once
2 #include <string>
3 #include <rapidjson/document.h>
4 
5 namespace dpyPrinter{
8 {
10  SLOW,
13 };
14 
17 {
18  LOW,
21 };
22 
25 {
26  NONE = 0,
27  PARTIAL = 1,
28  FULL = 2
29 };
30 
33 {
34  UNKNOWN = -1,
41  INTENSITY = 6,
43  PAPER_ADJ = 8,
44  SPEED = 9
45 };
46 
49 {
54 };
55 
56 }
57 
63 {
64  dpyPrinter::Parameter parameter;
65  int value;
66 
67 public:
68 
69  static std::string parameterToString(dpyPrinter::Parameter parameter);
70  static dpyPrinter::Parameter stringToParameter(std::string parameter);
71 
72  PrintConfig(dpyPrinter::Parameter parameter, int value);
73  ~PrintConfig();
74 
80  {
81  return parameter;
82  }
83 
88  int getValue() const
89  {
90  return value;
91  }
92 
97  void setValue(const int value)
98  {
99  this->value = value;
100  }
101 };
Normal speed.
Definition: printConfig.h:11
PaperSensor
Configuration parameter.
Definition: printConfig.h:48
Paper width.
Definition: printConfig.h:35
Sensor 4.
Definition: printConfig.h:53
Medium intensity.
Definition: printConfig.h:19
Represents a configuration for printing.
Definition: printConfig.h:62
Sensor 3.
Definition: printConfig.h:52
Unknown.
Definition: printConfig.h:34
int getValue() const
Definition: printConfig.h:88
Right margin.
Definition: printConfig.h:39
Paper adjust.
Definition: printConfig.h:43
Cut profile.
Definition: printConfig.h:42
Bottom margin.
Definition: printConfig.h:40
Ticket offset.
Definition: printConfig.h:36
Speed.
Definition: printConfig.h:44
Deepsy Printer namespace that includes the different enums, structs or method signatures that should ...
Definition: printerApi.h:13
Full cut.
Definition: printConfig.h:28
High intensity.
Definition: printConfig.h:20
Intensity.
Definition: printConfig.h:41
CutProfile
Cut profile value (for CUT_PROFILE parameter)
Definition: printConfig.h:24
Upper margin.
Definition: printConfig.h:37
Left margin.
Definition: printConfig.h:38
Partial cut.
Definition: printConfig.h:27
Ultra slow speed.
Definition: printConfig.h:9
Low intensity.
Definition: printConfig.h:18
dpyPrinter::Parameter getParameter() const
Definition: printConfig.h:79
No cut.
Definition: printConfig.h:26
Sensor 1.
Definition: printConfig.h:50
PrintIntensity
Print intensity value (for INTENSITY parameter)
Definition: printConfig.h:16
Fast speed.
Definition: printConfig.h:12
PrintSpeed
Print speed value (for SPEED parameter)
Definition: printConfig.h:7
void setValue(const int value)
Definition: printConfig.h:97
Sensor 2.
Definition: printConfig.h:51
Slow speed.
Definition: printConfig.h:10
Parameter
Configuration parameter.
Definition: printConfig.h:32