-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmsgdata.h
More file actions
48 lines (45 loc) · 1.77 KB
/
msgdata.h
File metadata and controls
48 lines (45 loc) · 1.77 KB
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
#ifndef MSGDATA_H
#define MSGDATA_H
//software vesion
#define SOFT_VERSION "VN2.0"
// no locos
#define ROASTER_INFO "RL0]\\["
//first info to send to ED
//#define START_INFO "VN2.0\n\rRL0]|[\n\rPPA1\n\rPTT]\[Turnouts}|{Turnout]\[Closed}|{2]\[Thrown}|{4\n\rPRT]\[Routes}|{Route]\[Active}|{2]\[Inactive}|{4\n\rRCC0\n\rPW12080\n\r"
#define START_INFO_RL "RL"//"0]\\["
#define START_INFO_PPA "PPA1"
#define START_INFO_PRT "PRT"//"]\\[Routes}|{Route]\\[Active}|{2]\\[Inactive}|{4"
#define START_INFO_PRL "PRL"//"]\\["
#define START_INFO_RCC "RCC0"
#define START_INFO_PW "PW12080"
//
#define DELIM_BRACET "]\\["
//
#define DELIM_BTLT "<;>"
//
#define DELIM_KEY "}|{"
//
#define EMPTY_LABELS "<;>]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[]\\[\n"
//MTS3<......MTLS1<;>]\[]\[]
//regex to identify a set speed message
#define RE_SPEED "M[0-9STA]+[SL\\*]([0-9]+)?<;>[VX]([0-9]+)?"
//regex to identify a create session message
#define RE_SESSION "M[0-9STA]+\\+[SL][0-9]+<;>.*"
//regex to identify a release session message
#define RE_REL_SESSION "M[0-9STGA]+\\-[SL\\*]([0-9]+)?<;>.*"
//regex to identify a create session message
#define RE_DIR "M[0-9STA]+[SL\\*]([0-9]+)?<;>R[0-1]"
//regex to identify a query speed
#define RE_QRY_SPEED "M[0-9STA]+[SL\\*]([0-9]+)?<;>qV"
//regex to identify a query direction
#define RE_QRY_DIRECTION "M[0-9STA]+[SL\\*]([0-9]+)?<;>qR"
//regex to identify a query direction
#define RE_FUNC "M[0-9STA]+[SL\\*]([0-9]+)?<;>F[0-9]+"
//regex to identify turnout messages
#define RE_TURNOUT "PTA[0-9]MT\\+[0-9]+;\\-[0-9]+"
//PTATMT8 PTACMT8
//regex to identify turnout messages
#define RE_TURNOUT_GENERIC "PTA[TC24]([MT])?[0-9]+"
//regex to identify idle
#define RE_IDLE "M[0-9STA]+[SL\\*]([0-9]+)?<;>I"
#endif //MSGDATA_H