1
0
Fork 0
mirror of https://github.com/rfc2822/GfxTablet synced 2025-10-03 17:49:17 +02:00
GfxTablet/doc/protocol.txt
Richard Hirner 5f1d8f29d8 * driver, app: new protocol
* new protocol specification that allows versioning (version 1)

* App: refactoring, version: 1.1
2013-02-05 04:04:40 +01:00

28 lines
680 B
Text

Network protocol used by GfxTablet
Version 1
---------
GfxTablet app sends UDP packets to port 40118 of the destination host.
Packet structure:
9 octets "GfxTablet"
1 ushort version number
1 ushort type:
0 motion event (hovering)
1 button event (finger, pen etc. touches surface)
1 ushort x (using full range: 0..65535)
1 ushort y (using full range: 0..65535)
1 ushort pressure (using full range 0..65535, 32768 == pressure 1.0f on Android device)
when type == button event:
1 byte number of button, starting with 0
1 byte button status:
0 button is down
1 button is up