Class RadioStatusRedactor
- All Implemented Interfaces:
LogDataReceiver
AdvantageKit logs the radio's /status JSON every cycle and has no switch to turn that
off. Logs go to the public log site, and the status holds the Wi-Fi key hashes, their salts and
MAC addresses: a salted hash is enough to try the Wi-Fi key offline. A list of fields to blank
misses whatever the next radio firmware adds, so this keeps a list of fields to log instead
(ALLOWED), in the status and in its networkStatus24 / networkStatus6
objects. Every other value keeps its type but not its content: strings become "", numbers
0, booleans false, arrays and objects empty. A status that does not parse becomes
{}.
Every data receiver is handed the same per-cycle copy of the log table, in the order they were
added, so this one must be added before all the others (addFirst(LogDataReceiver...)). It runs on
AdvantageKit's receiver thread and only rewrites that copy.
-
Field Summary
Fields inherited from interface LogDataReceiver
timestampKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFirst(LogDataReceiver... others) Adds a redactor as AdvantageKit's first data receiver, then the others in order.voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LogDataReceiver
end, start
-
Constructor Details
-
RadioStatusRedactor
public RadioStatusRedactor()
-
-
Method Details
-
addFirst
Adds a redactor as AdvantageKit's first data receiver, then the others in order. The way to add receivers, so none can be added ahead of the redactor.- Parameters:
others- the log writer, the dashboard publisher, ...
-
putTable
- Specified by:
putTablein interfaceLogDataReceiver
-