(b: &[u8])
| 249 | } |
| 250 | |
| 251 | async fn _handle_pr_start_req(b: &[u8]) -> Result<backend::PRStartAnsPayload> { |
| 252 | let pl: backend::PRStartReqPayload = serde_json::from_slice(b)?; |
| 253 | let phy = lrwn::PhyPayload::from_slice(&pl.phy_payload)?; |
| 254 | |
| 255 | if phy.mhdr.f_type == lrwn::FType::JoinRequest { |
| 256 | _handle_pr_start_req_join(pl, phy).await |
| 257 | } else { |
| 258 | _handle_pr_start_req_data(pl, phy).await |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | async fn _handle_pr_start_req_join( |
| 263 | pl: backend::PRStartReqPayload, |
no test coverage detected