Rewrite telemetry to meet the specification as stated in the above issue, and implement Jason's error and logging classes. Meet the command specification as stated in command_ingest's README.
Steps to Reproduce
Calls made to telemetry.enqueue() should enqueue the message (error, log, command) to general_queue.
The thread decide() should remove messages to general_queue as they come in and, depending on the format (error, log, command) send them to the error stack, log stack, or command_ingest respectively.
When dump() is called, subpackets from the error stack and the log stack (in that order) should be popped off their stacks, converted to their string representations, and concatenated until a maximum size is set (defined in config). This is then encoded to base64 and sent through the APRS (radio_output).
When clear_buffers is called, the two stacks and the general queue should be cleared.
Affected Areas
core/error.py (comments, stylistic changes)
core/log.py (same)
submodules/radio_output/__init__.py (fix the first import line)
Redid parts of telemetry, fixed several bugs I identified:
Lengths of packets would sometimes be longer than the config's length (I'm checking the length of the squished packets, not the length of the B64'd packets)
Not checking if there's stuff to deque before I pop
Rewrite telemetry
Issue #7
Description
Rewrite telemetry to meet the specification as stated in the above issue, and implement Jason's error and logging classes. Meet the command specification as stated in command_ingest's README.
Steps to Reproduce
telemetry.enqueue()
should enqueue the message (error, log, command) togeneral_queue
.decide()
should remove messages togeneral_queue
as they come in and, depending on the format (error, log, command) send them to the error stack, log stack, orcommand_ingest
respectively.dump()
is called, subpackets from the error stack and the log stack (in that order) should be popped off their stacks, converted to their string representations, and concatenated until a maximum size is set (defined in config). This is then encoded to base64 and sent through the APRS (radio_output).clear_buffers
is called, the two stacks and the general queue should be cleared.Affected Areas
core/error.py
(comments, stylistic changes)core/log.py
(same)submodules/radio_output/__init__.py
(fix the first import line)submodules/telemetry/README.md
(readme)submodules/telemetry/__init__.py