Payload decoders & units
Make measurement meaning explicit and testable.
A proposed decoder boundary
decode({ bytes, fPort, model, firmware })
→ { measurements: [{ name, value, unit }], warnings: [] }A decoder should be deterministic, versioned and free of network side effects. Choose it through a trusted device profile. Do not let an incoming payload name executable code or a remote decoder URL.
Preserve raw data
Store original application bytes alongside decoder version and normalized measurements. This supports investigation when firmware changes or a decoding defect is found. Reprocessing should produce a new versioned interpretation rather than erase the evidence.
Test beyond the happy path
- Known vendor examples with expected values and units.
- Truncated payloads, unsupported ports and unexpected lengths.
- Signed values, byte order and boundary values.
- Missing probes, invalid readings and firmware-specific status bits.
Current release boundary
Ghost Signal preserves the provider’s decoded object. It does not include model-specific sensor decoders or convert measurement units. No universal device compatibility is claimed.