(region_id: &str)
| 925 | } |
| 926 | |
| 927 | pub fn get_region_gateway(region_id: &str) -> Result<RegionGateway> { |
| 928 | let conf = get(); |
| 929 | for region in &conf.regions { |
| 930 | if region.id == region_id { |
| 931 | return Ok(region.gateway.clone()); |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | Err(anyhow!("Region ID '{}' not found", region_id)) |
| 936 | } |
| 937 | |
| 938 | pub fn get_required_snr_for_sf(sf: u8) -> Result<f32> { |
| 939 | Ok(match sf { |
no test coverage detected