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)
| 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() { |