mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-30 10:39:59 +00:00
* docs changes for PAYLOAD_TYPE_GRP_DATA
This commit is contained in:
@@ -557,7 +557,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
|
||||
- `set agc.reset.interval <value>`
|
||||
|
||||
**Parameters:**
|
||||
- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16)
|
||||
- `value`: Interval in seconds rounded down to a multiple of 4 (17 becomes 16). 0 to disable.
|
||||
|
||||
**Default:** `0.0`
|
||||
|
||||
|
||||
16
docs/number_allocations.md
Normal file
16
docs/number_allocations.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Number Allocations
|
||||
|
||||
This document lists unique numbers/identifiers used in various MeshCore protcol payloads.
|
||||
|
||||
# Group Data Types
|
||||
|
||||
The `PAYLOAD_TYPE_GRP_DATA` payloads have a 16-bit data-type field, which identifies which application the packet is for.
|
||||
|
||||
To make sure multiple applications can function without interfering with each other, the table below is for reserving various ranges of data-type values. Just modify this table, adding a row, then submit a PR to have it authorised/merged.
|
||||
|
||||
The 16-bit types are allocated in blocks of 16, ie. the lower 4-bits is the range.
|
||||
|
||||
| Data-Type range | App name | Contact |
|
||||
|-----------------|--------------------------|------------------------------------------------------|
|
||||
| 000x | -reserved- | |
|
||||
| FFFx | -reserved- | |
|
||||
@@ -226,7 +226,7 @@ txt_type
|
||||
| reply path | (variable) | reply path |
|
||||
|
||||
|
||||
# Group text message / datagram
|
||||
# Group text message
|
||||
|
||||
| Field | Size (bytes) | Description |
|
||||
|--------------|-----------------|--------------------------------------------|
|
||||
@@ -236,6 +236,22 @@ txt_type
|
||||
|
||||
The plaintext contained in the ciphertext matches the format described in [plain text message](#plain-text-message). Specifically, it consists of a four byte timestamp, a flags byte, and the message. The flags byte will generally be `0x00` because it is a "plain text message". The message will be of the form `<sender name>: <message body>` (eg., `user123: I'm on my way`).
|
||||
|
||||
# Group datagram
|
||||
|
||||
| Field | Size (bytes) | Description |
|
||||
|--------------|-----------------|--------------------------------------------|
|
||||
| channel hash | 1 | first byte of SHA256 of channel's shared key |
|
||||
| cipher MAC | 2 | MAC for encrypted data in next field |
|
||||
| ciphertext | rest of payload | encrypted data, see below for details |
|
||||
|
||||
The data contained in the ciphertext uses the format below:
|
||||
|
||||
| Field | Size (bytes) | Description |
|
||||
|--------------|-----------------|--------------------------------------------|
|
||||
| data type | 2 | Identifier for type of data. (See number_allocations.md) |
|
||||
| data len | 1 | byte length of data |
|
||||
| data | rest of payload | (depends on data type) |
|
||||
|
||||
|
||||
# Control data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user