Difference between revisions of "Network API"
Line 2: | Line 2: | ||
See the "--src IP:port" argument on the [[Command_line#General_gimx_options|Command line page]]. | See the "--src IP:port" argument on the [[Command_line#General_gimx_options|Command line page]]. | ||
− | + | =Get controller type= | |
+ | |||
+ | {| class="wikitable" style="text-align: center;" | ||
+ | |+Request | ||
+ | | byte 0 || 0x11 | ||
+ | |- | ||
+ | | byte 1 || 0x00 | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" style="text-align: center;" | ||
+ | |+Answer | ||
+ | | byte 0 || 0x11 | ||
+ | |- | ||
+ | | byte 1 || 0x01 | ||
+ | |- | ||
+ | | byte 2 || type | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" style="text-align: center;" | ||
+ | |value || type | ||
+ | | 0 || JOYSTICK | ||
+ | |- | ||
+ | | 1 || 360 PAD | ||
+ | |- | ||
+ | | 2 || SIXAXIS | ||
+ | |- | ||
+ | | 5 || DS4 | ||
+ | |- | ||
+ | | 7 || T300RS PS4 | ||
+ | |- | ||
+ | | 8 || G27 PS3 | ||
+ | |} | ||
+ | |||
+ | =Send report= | ||
+ | |||
+ | All axes are signed integers. | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" |
Revision as of 00:09, 14 January 2015
It's possible to make a GIMX instance listen for UDP packets coming from a specific port.
See the "--src IP:port" argument on the Command line page.
Get controller type
byte 0 | 0x11 |
byte 1 | 0x00 |
byte 0 | 0x11 |
byte 1 | 0x01 |
byte 2 | type |
value | type | 0 | JOYSTICK |
1 | 360 PAD | ||
2 | SIXAXIS | ||
5 | DS4 | ||
7 | T300RS PS4 | ||
8 | G27 PS3 |
Send report
All axes are signed integers.
byte 0 | 0xff |
byte 1 | 0x7c = 124 |
byte 2-5 | axis 0 |
byte 6-9 | axis 1 |
byte 10-13 | axis 2 |
byte 14-17 | axis 3 |
byte 18-21 | axis 4 |
byte 22-25 | axis 5 |
byte 26-29 | axis 6 |
byte 30-33 | axis 7 |
byte 34-37 | axis 8 |
byte 38-41 | axis 9 |
byte 42-45 | axis 10 |
byte 46-49 | axis 11 |
byte 50-53 | axis 12 |
byte 54-57 | axis 13 |
byte 58-61 | axis 14 |
byte 62-65 | axis 15 |
byte 66-69 | axis 16 |
byte 70-73 | axis 17 |
byte 74-77 | axis 18 |
byte 78-81 | axis 19 |
byte 82-85 | axis 20 |
byte 86-89 | axis 21 |
byte 90-93 | axis 22 |
byte 94-97 | axis 23 |
byte 98-101 | axis 24 |
byte 102-105 | axis 25 |
byte 106-109 | axis 26 |
byte 110-113 | axis 27 |
byte 114-117 | axis 28 |
byte 118-121 | axis 29 |
byte 122-125 | axis 30 |