Skip to main content

pamoja_gateway_network_open

Function pamoja_gateway_network_open 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_network_open( plan: *const PamojaLoraPlan, net_id: u32, windows: PamojaGatewayNetworkWindows, first_dev_addr: u32, out_network: *mut *mut PamojaGatewayNetwork, ) -> PamojaStatus
Expand description

Opens the network side of a site on a channel plan.

§Arguments

  • plan - the band this site operates in, which is copied into the network.
  • net_id - the network identifier granted addresses carry; only its low 24 bits travel.
  • windows - when and where to answer, from pamoja_gateway_network_windows_default.
  • first_dev_addr - the first address to grant; later joins take the ones after it.
  • out_network - receives the handle.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument for a null plan or output.

§Safety

plan must be a live handle from the region calls, and out_network must point at a writable pointer.