-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotocol.dat
More file actions
68 lines (51 loc) · 1.49 KB
/
Copy pathprotocol.dat
File metadata and controls
68 lines (51 loc) · 1.49 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# protokoll def + docu
# jede message hat zusätlich noch einen header mit sizeof() + seqNr
# I .. int als zahl oder bitmaske verwendet
# S .. string
# A{} .. array mit beliebig vielen elementen
# Kommentare und Leerzeilen werden ignoriert
# erste Message vom server -> client
# TODO: bei Protokoll Änderung jedem Command eine ID geben z.b. 1:HELO und nach der Versionsnummer gehen
HELO=protohash:I,name:S,version:S
HELO_ERR=protohash:I,doupdate:I
# im prinzip ein pollen
PING=
# reply = geänderte loks, kann size 0 sein
STATUS_REPLY=info:A{addr:I,speed:I,functions:I}
# beschleunigen reply = STATUS_REPLY
ACC=addr:I
# bremsen
BREAK=addr:I
# vor (1) oder zurück (-1)
DIR=addr:I,dir:I
# stop
STOP=addr:I
ACC_MULTI=list:A{addr:I}
BREAK_MULTI=list:A{addr:I}
DIR_MULTI=dir:I,list:A{addr:I}
STOP_MULTI=list:A{addr:I}
# func ein/aus
SETFUNC=addr:I,funcnr:I,value:I
# notstop/power off, speed jeder lok auf 0 setzen?
POWER=value:I
POWER_REPLY=value:I
#
GETFUNCTIONS=addr:I
GETFUNCTIONS_REPLY=info:A{name:S,value:I,imgname:S}
GETLOCOS=
GETLOCOS_REPLY=info:A{name:S,addr:I,imgname:S,speed:I,functions:I}
# value -1 = nix ändern, nur Wert liefern
POM=addr:I,cv:I,value:I
# 0=fehler(???) 1=ok 2021 ret=wert, -1 => fehler
POM_REPLY=value:I
POMBIT=addr:I,cv:I,bit:I,value:I
POMBIT_REPLY=value:I
# liefert eine Datei (mini icon) | TODO: CVs.csv => CV liste
GETIMAGE=imgname:S
GETIMAGE_REPLY=img:S
BTSCAN=
BTSCAN_REPLY=info:A{addr:S,name:S}
BTPUSH=addr:S,type:I
BTPUSH_REPLY=rc:I
# ganz zum schluss ...
version=1.0:I