mirror of
https://github.com/rfc2822/GfxTablet
synced 2025-10-03 17:49:17 +02:00
commit
ff865c297b
1 changed files with 12 additions and 13 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
Network protocol used by GfxTablet
|
Network protocol used by GfxTablet
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,19 +7,19 @@ Version 1
|
||||||
|
|
||||||
GfxTablet app sends UDP packets to port 40118 of the destination host.
|
GfxTablet app sends UDP packets to port 40118 of the destination host.
|
||||||
|
|
||||||
Packet structure:
|
Packet structure, uses network byte order (big endian):
|
||||||
|
|
||||||
9 octets "GfxTablet"
|
9 bytes "GfxTablet"
|
||||||
1 ushort version number
|
1 word version number
|
||||||
1 ushort type:
|
1 byte type:
|
||||||
0 motion event (hovering)
|
0 motion event (hovering)
|
||||||
1 button event (finger, pen etc. touches surface)
|
1 button event (finger, pen etc. touches surface)
|
||||||
|
|
||||||
1 ushort x (using full range: 0..65535)
|
1 word x (using full range: 0..65535)
|
||||||
1 ushort y (using full range: 0..65535)
|
1 word y (using full range: 0..65535)
|
||||||
1 ushort pressure (using full range 0..65535, 32768 == pressure 1.0f on Android device)
|
1 word pressure (using full range 0..65535, 32768 == pressure 1.0f on Android device)
|
||||||
|
|
||||||
when type == button event:
|
when type == button event:
|
||||||
1 byte number of button, starting with 0
|
1 byte number of button, starting with 0
|
||||||
1 byte button status:
|
1 byte button status:
|
||||||
0 button is down
|
0 button is down
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue