-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_defines.h
94 lines (81 loc) · 3.4 KB
/
common_defines.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#pragma once
#include <iostream>
/* Features */
// #define FEATURE_TESTING
// #define FEATURE_CLIENT_OFF
/* Color features */
#define FONT_BLACK "\033[0;30m"
#define FONT_RED "\033[0;31m"
#define FONT_GREEN "\033[0;32m"
#define FONT_BROWN "\033[0;33m"
#define FONT_BLUE "\033[0;34m"
#define FONT_MAGENTA "\033[0;35m"
#define FONT_CYAN "\033[0;36m"
#define FONT_LIGHT_GRAY "\033[0;37m"
#define FONT_DARK_GRAY "\033[1;30m"
#define FONT_LIGHT_BLUE "\033[1;34m"
#define FONT_LIGHT_GREEN "\033[1;32m"
#define FONT_LIGHT_CYAN "\033[1;36m"
#define FONT_LIGHT_RED "\033[1;31m"
#define FONT_LIGHT_PURPLE "\033[1;35m"
#define FONT_YELLOW "\033[1;33m"
#define FONT_WHITE "\033[1;37m"
#define FONT_RESET "\033[0m"
#define BACK_BLACK "\033[0;40m"
#define BACK_RED "\033[0;41m"
#define BACK_GREEN "\033[0;42m"
#define BACK_BROWN "\033[0;43m"
#define BACK_BLUE "\033[0;44m"
#define BACK_MAGENTA "\033[0;45m"
#define BACK_CYAN "\033[0;46m"
#define BACK_LIGHT_GREY "\033[0;47m"
/* Cursor features */
#define CONSOLE_LINE(x) std::cout << std::string(x, '-') << std::endl;
#define CONSOLE_LINE_50 std::string(50, '-')
#define CONSOLE_LINE_60 std::string(60, '-')
#define CONSOLE_LINE_70 std::string(70, '-')
#define CONSOLE_LINE_80 std::string(80, '-')
#define CONSOLE_LINE_90 std::string(90, '-')
#define CONSOLE_LINE_100 std::string(100, '-')
#define CONSOLE_STARS(x) std::cout << std::string(x, '*') << std::endl;
#define CONSOLE_STARS_50 std::string(50, '*')
#define CONSOLE_STARS_60 std::string(60, '*')
#define CONSOLE_STARS_70 std::string(70, '*')
#define CONSOLE_STARS_80 std::string(80, '*')
#define CONSOLE_STARS_90 std::string(90, '*')
#define CONSOLE_STARS_100 std::string(100, '*')
#define CURSOR(x,y) "\033[" << y << ";" << x << "H"
#define CURSOR_COL(x) "\033[" << x << "G"
#define CURSOR_ROW(y) "\033[" << y << "d"
#define CURSOR_OFF "\033[?25l"
#define CURSOR_ON "\033[?25h"
/* Init client */
#define DEFAULT_IP "192.168.200.70"
#define DEFAULT_PORT "4840"
#define DEFAULT_USER "opcuser"
#define DEFAULT_PASS "opcpass"
#define DEFAULT_URL "DEFAULT"
#define DEFAULT_SECURE_MODE false
/* Job handling */
#define JOB_MITEMADD "MitemAdd"
#define JOB_MITEMDEL "MitemDel"
#define JOB_NODEREAD "NodeRead"
#define JOB_NODEWRITE "NodeWrite"
#define JOB_BROWSE "Browse"
#define JOB_PRINT "Print"
#define JOB_REPLACE "Replace"
#define PRAEFIX_INIT "Initial"
#define PRAEFIX_TYPE "Type"
#define PRAEFIX_ID "Id"
#define PRAEFIX_NS "Namespace"
#define PRAEFIX_NODE "Node"
#define PRAEFIX_LANGUAGE "Language"
#define PRAEFIX_JOBTYPE "Jobtype"
#define DATA_READ "Read"
#define DATA_WRITE "Write"
#define DATA_PRINT "Print"
#define DATA_UPLOAD "Upload"
#define STATUS_ACTIVE 2
#define STATUS_WORK 1
#define STATUS_DEAD 0
/* Eof */