gsd 4 months ago
parent
commit
6de1daba1f
  1. 13
      mesht_device.py
  2. 14
      protobufs_extra/device_metadata_proto.py
  3. 4
      protobufs_extra/file_info_proto.py
  4. 6
      protobufs_extra/logrecord_schema.py
  5. 6
      protobufs_extra/queuestatus_proto.py

13
mesht_device.py

@ -7,7 +7,10 @@ from mesht_models import *
from mesht_protobuf_extra import *
from protobufs_extra.position_proto import *
from protobufs_extra.telemetry_proto import *
from protobufs_extra.logrecord_schema import *
from protobufs_extra.queuestatus_proto import *
from protobufs_extra.device_metadata_proto import *
from protobufs_extra.file_info_proto import *
DATA_SCHEMA = [
("varint", "portnum", 1),
@ -115,16 +118,16 @@ FROMRADIO_SCHEMA = [
(MYNODEINFO_SCHEMA, "my_info", 3),
(NODEINFO_SCHEMA, "node_info", 4),
(CONFIG_SCHEMA, "config", 5),
##(LOG_RECORD, "log_record", 6),
(LOGRECORD_SCHEMA, "log_record", 6),
("uint32", "config_complete_id", 7),
("bool", "rebooted", 8),
#(moduleConfig, 9)*
(CHANNEL_SCHEMA, "channel", 10),
#(#QUEUE_STATUS, "queueStatus", 11),
(QUEUE_STATUS_SCHEMA, "queueStatus", 11),
#(xmodem, 12)
##(DEVICE_METADATA, 13),
(DEVICE_METADATA_SCHEME, 13),
#(mqttproxy, 14)
##(FILE_INFO, 15),
(FILE_INFO_SCHEME, 15),
#(clientnotifi, 16)
#(deviceui, 17)*
]),

14
protobufs_extra/device_metadata_proto.py

@ -0,0 +1,14 @@
DEVICE_METADATA_SCHEME = [
("string", "firmware_version", 1),
("uint32", "device_state_version", 2),
("bool", "canShutdown", 3),
("bool", "hasWifi", 4),
("bool", "hasBluetooth", 5),
("bool", "hasEthernet", 6),
("int32", "role", 7),
("uint32", "position_flags", 8),
("int32", "hw_model", 9),
("bool", "hasRemoteHardware", 10),
("bool", "hasPKC", 11),
("uint32", "excluded_modules", 12)
]

4
protobufs_extra/file_info_proto.py

@ -0,0 +1,4 @@
FILE_INFO_SCHEME = [
("string", "file_name", 1),
("uint32", "size_bytes", 2)
]

6
protobufs_extra/logrecord_schema.py

@ -0,0 +1,6 @@
LOGRECORD_SCHEMA = [
("string", "message", 1),
("fixed32", "time", 2),
("string", "source", 3),
("int32", "level", 4)
]

6
protobufs_extra/queuestatus_proto.py

@ -0,0 +1,6 @@
QUEUE_STATUS_SCHEMA = [
("int32", "res", 1),
("uint32", "free", 2),
("uint32", "maxlen", 3),
("uint32", "mesh_packet_id", 4)
]
Loading…
Cancel
Save