pub struct DataReceivedResult {Show 21 fields
pub source_node: NodeId,
pub is_emergency: bool,
pub is_ack: bool,
pub counter_changed: bool,
pub emergency_changed: bool,
pub total_count: u64,
pub event_timestamp: u64,
pub relay_data: Option<Vec<u8>>,
pub origin_node: Option<NodeId>,
pub hop_count: u8,
pub callsign: Option<String>,
pub battery_percent: Option<u8>,
pub heart_rate: Option<u8>,
pub event_type: Option<u8>,
pub latitude: Option<f32>,
pub longitude: Option<f32>,
pub altitude: Option<f32>,
pub activity_level: Option<u8>,
pub alerts: Option<u8>,
pub decoded_translator_frame: Option<DecodedTranslatorFrame>,
pub peat_lite_document: Option<PeatLiteDocumentFrame>,
}Expand description
Result from receiving BLE data
Fields§
§source_node: NodeIdNode that sent this data
is_emergency: boolWhether this contained an emergency event
is_ack: boolWhether this contained an ACK event
counter_changed: boolWhether the counter changed (new data)
emergency_changed: boolWhether emergency state changed (new emergency or ACK updates)
total_count: u64Updated total count
event_timestamp: u64Event timestamp (if event present) - use to detect duplicate events
relay_data: Option<Vec<u8>>Data to relay to other peers (if multi-hop relay is enabled)
When present, the platform adapter should send this data to peers
returned by get_relay_targets(Some(source_node)).
origin_node: Option<NodeId>Origin node for relay (may differ from source_node for relayed messages)
hop_count: u8Current hop count (for relayed messages)
callsign: Option<String>Sender’s callsign (up to 12 chars)
battery_percent: Option<u8>Sender’s battery percentage (0-100)
heart_rate: Option<u8>Sender’s heart rate (BPM)
event_type: Option<u8>Sender’s event type (from PeripheralEvent)
latitude: Option<f32>Sender’s latitude
longitude: Option<f32>Sender’s longitude
altitude: Option<f32>Sender’s altitude (meters)
activity_level: Option<u8>Sender’s activity level (0=Standing, 3=PossibleFall, 4=Prone, …).
Mirrors HealthStatus::activity from the merged peripheral so
hosts can render posture state without re-decoding the wire
bytes. None when no peripheral data was attached to the merge.
alerts: Option<u8>Sender’s health alerts bitfield (e.g. ALERT_MAN_DOWN = 0x01).
Mirrors HealthStatus::alerts from the merged peripheral. The
receive-side surfaces this so consumers (the ATAK plugin’s
_platformOfflinePeers toggle) can flip OFFLINE state directly
from peripheral broadcasts, without needing the higher-level
0xB6 platforms translator-frame to fire.
decoded_translator_frame: Option<DecodedTranslatorFrame>ADR-059 Amendment 3 — set when the receive dispatch decoded a
0xB6 translator frame on this call. None for legacy/delta/
reserved-marker paths, for 0xB6 frames that declined or errored,
and for builds compiled without the translator-codec feature
(the field stays in the binding shape unconditionally so hosts
don’t see binding drift across feature combos; only the
population logic is feature-gated).
peat_lite_document: Option<PeatLiteDocumentFrame>Universal-Document-transport amendment — set when the receive
dispatch decoded a peat-lite Document frame
(MessageType::Document, magic-prefix b"PEAT") on this
call. Polled-consumer hosts (peat-mesh, peat-atak-plugin’s
marker bridge, …) forward populated entries through their
existing publish-with-origin FFI surface to plug the body
into peat-mesh’s doc store.
None for typed-translator (0xB6) / delta / legacy-peripheral
paths, for peat-lite frames that declined or errored, and for
builds compiled without the peat-lite-frame feature (the
field stays in the binding shape unconditionally so hosts
don’t see binding drift across feature combos; only the
population logic is feature-gated).
Trait Implementations§
Source§impl Clone for DataReceivedResult
impl Clone for DataReceivedResult
Source§fn clone(&self) -> DataReceivedResult
fn clone(&self) -> DataReceivedResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more