mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
feat: Require 0xFF for custom payloads
ref:
This commit is contained in:
parent
9b84278607
commit
0e98939987
1 changed files with 2 additions and 2 deletions
|
|
@ -298,7 +298,7 @@ Bytes 7+: Binary payload bytes (variable length)
|
|||
```
|
||||
|
||||
**Data Type / Transport Mapping**:
|
||||
- `0xFF` (`TXT_TYPE_CUSTOM_BINARY`) is the custom-app binary type.
|
||||
- `0xFF` (`TXT_TYPE_CUSTOM_BINARY`) must be used for custom-protocol binary datagrams.
|
||||
- `0x00` (`TXT_TYPE_PLAIN`) is invalid for this command.
|
||||
- Values other than `0xFF` are reserved for official protocol extensions.
|
||||
|
||||
|
|
@ -489,7 +489,7 @@ Bytes 11+: Payload bytes
|
|||
**Payload Meaning**:
|
||||
- If `txt_type == 0x00`: payload is UTF-8 channel text.
|
||||
- If `txt_type != 0x00`: payload is binary (for example image/voice fragments) and must be treated as raw bytes.
|
||||
For custom app datagrams sent via `CMD_SEND_CHANNEL_DATA`, use `txt_type == 0xFF`.
|
||||
For custom app datagrams sent via `CMD_SEND_CHANNEL_DATA`, `txt_type` must be `0xFF`.
|
||||
|
||||
**Parsing Pseudocode**:
|
||||
```python
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue