Expand description
The C ABI for the network side of one site.
These functions wrap pamoja_gateway::network for callers that reach the SDK through
the flat C boundary. A network holds the devices it admits, the sessions it has granted,
and the counters it has seen, so it crosses as an opaque handle: open one on a channel
plan, register the devices it should admit, hand it each packet a gateway forwarded, and
release it with pamoja_gateway_network_free.
A forwarded packet turns out to be one of three things, so the answer crosses as a flat event with an outcome byte that says which: a device joined and its accept is ready to transmit, a session frame arrived and was decrypted into the caller buffer, or the frame belongs to a network this site never granted, which a gateway hears all the time and is not an error.
Where and when to answer comes back with the event, so a downlink is built for the same window the uplink opened without the caller working out any of it.
Structs§
- Pamoja
Gateway Network - The network side of one site, released with
pamoja_gateway_network_free. - Pamoja
Gateway Network Event - What a forwarded packet turned out to be.
- Pamoja
Gateway Network Notice - A device a relay heard and could not verify, TS011-1.0.1 section 10.7.
- Pamoja
Gateway Network Slot - Where and when a downlink answers an uplink, in the concentrator’s own terms.
- Pamoja
Gateway Network Windows - When and where a network answers, and at what rate.
Constants§
- PAMOJA_
GATEWAY_ NETWORK_ DATA - A session frame arrived, decrypted into the caller buffer.
- PAMOJA_
GATEWAY_ NETWORK_ FOREIGN - The frame belongs to a device this site never granted.
- PAMOJA_
GATEWAY_ NETWORK_ JOINED - A device joined, and its accept is in the event.
- PAMOJA_
GATEWAY_ NETWORK_ JOIN_ DELAY_ US - The delay before the window a join accept is sent in, in microseconds.
- PAMOJA_
GATEWAY_ NETWORK_ RECEIVE_ DELAY_ US - The delay before the first receive window, in microseconds.
- PAMOJA_
GATEWAY_ NETWORK_ RX1_ DOWNSTREAM - The first receive window answers on a run of downlink channels, chosen by the uplink channel number modulo how many the run holds.
- PAMOJA_
GATEWAY_ NETWORK_ RX1_ PLAN - The first receive window answers where the network’s channel plan says: on the uplink frequency in a dynamic plan, and on the downlink channel a fixed plan numbers for the uplink channel.
- PAMOJA_
GATEWAY_ NETWORK_ RX1_ SAME - The first receive window answers on the frequency the uplink arrived on.
Functions§
- pamoja_
gateway_ ⚠network_ answer - Builds a downlink for a device, encrypted with its session.
- pamoja_
gateway_ ⚠network_ command - Builds a downlink carrying MAC commands, which is how a network configures a relay.
- pamoja_
gateway_ ⚠network_ free - Releases a network.
- pamoja_
gateway_ ⚠network_ notices - Takes the devices relays have reported hearing and could not verify.
- pamoja_
gateway_ ⚠network_ open - Opens the network side of a site on a channel plan.
- pamoja_
gateway_ ⚠network_ register - Admits a device, so a join request signed with its key is accepted.
- pamoja_
gateway_ ⚠network_ trust_ command - Builds the command that tells a relay to trust a device, with the key that lets it verify the device’s wake-on-radio frames, TS011-1.0.1 section 10.4.
- pamoja_
gateway_ ⚠network_ uplink - Reads a packet the gateway forwarded.
- pamoja_
gateway_ network_ windows_ default - Returns the windows a network answers in by default.