-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocol
79 lines (64 loc) · 2.35 KB
/
protocol
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
OpenParkingFinder - An open source parking manager and parking finder.
Copyright (C) 2019 Louis van der Walt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
A decription of the TCP protocol for communication. THIS FILE IS NOT USED TO CHANGE SETTINGS, ONLY FOR REFRENCE.
Client in this context means a node, parking machine or gate. For the most part 0x0F?? = node, 0x0E?? = parking machine, 0x0D?? = gate, 0x01?? = Hub.
client to server packet structure
2 bytes optcode
8 bytes ID (node = 0xA0??????????????, parking machine = 0xB0??????????????, gate = 0xC0??????????????)
54 bytes data
TOTAL SIZE = 64 bytes
server to client packet structure
2 bytes optcode
62 bytes data
TOTAL SIZE = 64 bytes
Optcodes
CLIENT TO SERVER ONLY
0x0F00
Requests config data from the server.
Arguments: 0 bytes
0x0F01
Send information about the parkings to the hub
Arguments: 36 bytes
2 bytes Parking num in row Left
2 bytes Parking num in row Right
16 bytes Number plate reading right
16 bytes Number plate reading left
0x0E00
Request parking from database
Arguments: 4 bytes
4 bytes Ticket no.
0x0D00
Request ticket
Arguments: 16 bytes
16 bytes Number plate reading
SERVER TO CLIENT ONLY
0x0100
Send the position information to the node
Arguments: 8 bytes
4 bytes Rail length in mm
4 bytes Steps per parking
0x0101
Supply ticket no
Arguments: 8 bytes
4 bytes Ticket no.
4 bytes Time
0x0102
Respond w/ place parked
Arguments: 4 bytes
1 bytes parkade
1 bytes floor
1 bytes row
1 bytes parking
0x0200
Error
Arguments: 2 bytes
2 bytes Error code