-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathmesh.options
More file actions
122 lines (92 loc) · 4.31 KB
/
Copy pathmesh.options
File metadata and controls
122 lines (92 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# options for nanopb
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options
*macaddr max_size:6 fixed_length:true # macaddrs
*id max_size:16 # node id strings
*public_key max_size:32 # public key
# Decode width stays 40 so NodeInfo/set_owner from senders built against the
# old 39-byte limit still parse (nanopb halts on string overflow rather than
# truncating). Firmware clamps everything it stores or transmits to 24 bytes -
# see NodeInfoLite.long_name in deviceonly.options.
*User.long_name max_size:40
*User.short_name max_size:5
*RouteDiscovery.route max_count:8
*RouteDiscovery.snr_towards max_count:8
*RouteDiscovery.snr_towards int_size:8
*RouteDiscovery.route_back max_count:8
*RouteDiscovery.snr_back max_count:8
*RouteDiscovery.snr_back int_size:8
# note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is
# outside of this envelope
*Data.payload max_size:233
*Data.bitfield int_size:8
*Data.xeddsa_signature max_size:64
*NodeInfo.channel int_size:8
*NodeInfo.hops_away int_size:8
# Big enough for 1.2.28.568032c-d
*MyNodeInfo.firmware_version max_size:18
*MyNodeInfo.device_id max_size:16
*MyNodeInfo.pio_env max_size:40
*MyNodeInfo.air_period_tx max_count:8
*MyNodeInfo.air_period_rx max_count:8
*MyNodeInfo.firmware_edition int_size:8
*MyNodeInfo.nodedb_count int_size:16
# Note: the actual limit (because of header bytes) on the size of encrypted payloads is 251 bytes, but I use 256
# here because we might need to fill with zeros for padding to encryption block size (16 bytes per block)
*MeshPacket.encrypted max_size:256
*MeshPacket.payload_variant anonymous_oneof:true
*MeshPacket.hop_limit int_size:8
*MeshPacket.hop_start int_size:8
*MeshPacket.channel int_size:8
*MeshPacket.next_hop int_size:8
*MeshPacket.relay_node int_size:8
*QueueStatus.res int_size:8
*QueueStatus.free int_size:8
*QueueStatus.maxlen int_size:8
*ToRadio.payload_variant anonymous_oneof:true
*FromRadio.payload_variant anonymous_oneof:true
*Routing.variant anonymous_oneof:true
*LogRecord.message max_size:384
*LogRecord.source max_size:32
*FileInfo.file_name max_size:228
*ClientNotification.message max_size:400
*KeyVerificationNumberInform.remote_longname max_size:40
*KeyVerificationNumberRequest.remote_longname max_size:40
*KeyVerificationFinal.remote_longname max_size:40
*KeyVerificationFinal.verification_characters max_size:10
*KeyVerification.hash1 max_size:32
*KeyVerification.hash2 max_size:32
*StoreForwardPlusPlus.message_hash max_size:32
*StoreForwardPlusPlus.commit_hash max_size:32
*StoreForwardPlusPlus.root_hash max_size:32
*StoreForwardPlusPlus.message max_size:240
*RemoteShell.payload max_size:200
*StatusMessage.status max_size:80
# MyMessage.name max_size:40
# or fixed_length or fixed_count, or max_count
#This value may want to be a few bytes smaller to compensate for the parent fields.
*Compressed.data max_size:233
*Waypoint.name max_size:30
*Waypoint.description max_size:100
*NeighborInfo.neighbors max_count:10
*DeviceMetadata.firmware_version max_size:18
# Region->preset compatibility map (FromRadio.region_presets). Bounds chosen
# above the current table (6 groups / 9 presets in the largest group / 32 regions)
# so LoRaRegionPresetMap stays small enough that FromRadio_size does not grow past
# the 512-byte MAX_TO_FROM_RADIO_SIZE cap. nanopb sizes repeated enums unpacked
# (~2 bytes/element), so the flat groups + region_groups layout keeps cost additive
# rather than groups*regions. See bin/regen-protos.sh output for the actual size.
# region_groups capped at 38 = the number of RegionCode enum values, so it can
# never overflow regardless of how many regions gain a firmware table entry.
*LoRaRegionPresetMap.groups max_count:8
*LoRaRegionPresetMap.region_groups max_count:38
*LoRaPresetGroup.presets max_count:11
*LoRaRegionPresets.group_index int_size:8
*MqttClientProxyMessage.topic max_size:60
*MqttClientProxyMessage.data max_size:435
*MqttClientProxyMessage.text max_size:435
*ChunkedPayload.chunk_count int_size:16
*ChunkedPayload.chunk_index int_size:16
*ChunkedPayload.payload_chunk max_size:228
# Longest documented value is "token_wrong_size" (16 chars); 32 leaves room
# for future short reasons without forcing nanopb to use callbacks.
*LockdownStatus.lock_reason max_size:32