MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / is_application_payload

Method is_application_payload

chirpstack/src/downlink/tx_ack.rs:768–779  ·  view source on GitHub ↗

Returns true if the downlink_frame is associated to a dev_eui and if the f_port > 0. In the case the downlink is multicast, the f_port > 0, but the dev_eui is not set.

(&self)

Source from the content-addressed store, hash-verified

766 // Returns true if the downlink_frame is associated to a dev_eui and if the f_port > 0.
767 // In the case the downlink is multicast, the f_port > 0, but the dev_eui is not set.
768 fn is_application_payload(&self) -> bool {
769 if self.downlink_frame.as_ref().unwrap().dev_eui.is_empty() {
770 return false;
771 }
772
773 if let lrwn::Payload::MACPayload(pl) = &self.phy_payload.as_ref().unwrap().payload
774 && pl.f_port.unwrap_or(0) != 0
775 {
776 return true;
777 }
778 false
779 }
780
781 fn is_application_payload_relayed(&self) -> bool {
782 if self.downlink_frame.as_ref().unwrap().dev_eui.is_empty() {

Callers 1

_handleMethod · 0.80

Calls 2

unwrapMethod · 0.80
as_refMethod · 0.80

Tested by

no test coverage detected