healthrian_ble_support_for_mqtt 0.2.0
healthrian_ble_support_for_mqtt: ^0.2.0 copied to clipboard
ECG monitoring over MQTT — CardioEM DPCM+GR frames, live or replayed.
healthrian_ble_support_for_mqtt #
ECG monitoring over MQTT. Every publisher sends CardioEM DPCM+GR frames (3-byte header + 9 samples × 8 wire channels), whatever device it reads from.
// Publish: re-encode a device's packets as CardioEM frames.
final send = cardioEmMqttAdapter(module.ecg!, topic.publishMessage);
module.ecg!.rawStreamAdapter = send;
// Receive live. The sampling rate is inferred from how fast frames arrive
// (~1.5 s after start).
final live = ManagerMqttReceiver(topic: topic);
// Replay a recording from mqtt_record_server.
final replay = ManagerMqttReceiver(
topic: topic,
replayServer: Uri.parse('http://127.0.0.1:8080'),
);