Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe optimization #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,18 @@ If controller for some port is not connected, you can respond with 12 zero bytes

| Offset | Length | Type | Meaning |
| ------ | ------ | ---- | ------- |
| 0 | 4 | **Signed 32-bit** | Amount of ports you should report about. Always less than 5. |
| 4 | 1 to 4 | Unsigned 8-bit (array) | Each byte represent number of slot you should report about. Count of bytes here is determined by value above. Each value is less than 4. |
| 0 | 4 | **Signed 32-bit** | Amount of slots you should report about. Always less than 5. |
| 4 | 1 to 4 | Unsigned 8-bit (array) | Each byte represent index of slot you should report about. Count of bytes here is determined by value above. Each value is less than 4.|

Example: 0x4 + 0x0,0x1,0x2,0x3 . You should reply with 4 separate packages. From slot 0 to 3.

For every requested controller slot you should send one packet structured like described below.

### Outgoing packet structure:

| Offset | Length | Type | Meaning |
| ------ | ------ | ---- | ------- |
| 0 | 11 | Complex | Beginning described above |
| 0 | 11 | Complex | Shared response beginning for message types above|
| 11 | 1 | N/A | Zero byte (`\0`). |

# Actual controllers data
Expand Down