Expand description
The C ABI for the LoRa Basics Station protocol.
These functions wrap pamoja_gateway::station for callers that reach the SDK through the
flat C boundary. A station and its network server exchange JSON messages over a websocket
the caller owns, so nothing here opens a socket: a message crosses as an opaque handle,
built from a frame the radio heard, read from text that arrived, or built from its fields,
and written back out as the text to send.
A handle is used rather than one flat struct because the messages differ too much to share
one shape: a configuration carries a table of data rates and a schedule carries a list of
frames, while a join request carries eight fixed fields. PamojaGatewayStationFields
holds every fixed field of every kind, and the calls below add and read the text, the bytes
and the lists a kind carries besides.
To build a message, fill the fields of its kind, call
pamoja_gateway_station_message_new, then add its text, bytes and entries. To read one,
take its fields with pamoja_gateway_station_message_fields, then read whichever text,
bytes and entries the counts there say it carries.
Structs§
- Pamoja
Gateway Station Broadcast - One frame of a schedule, apart from its bytes.
- Pamoja
Gateway Station Data Rate - One number of a configuration’s data-rate table.
- Pamoja
Gateway Station Fields - Every fixed field a message carries, for any kind.
- Pamoja
Gateway Station Join Range - A range of join identifiers whose join requests a station forwards, both ends included.
- Pamoja
Gateway Station Levels - How a station heard a packet, as it reports it.
- Pamoja
Gateway Station Message - A message either side of a session sends.
- Pamoja
Gateway Station Router Ids - The identities a discovery answer names.
- Pamoja
Gateway Station Window - A receive window, or the ping slot of a class B downlink: a data rate and a frequency.
- Pamoja
Gateway Station Xtime - A station clock value taken apart.
Constants§
- PAMOJA_
GATEWAY_ STATION_ DOWNLINK - A frame the server asks the station to transmit.
- PAMOJA_
GATEWAY_ STATION_ JOIN_ REQUEST - A join request the station heard.
- PAMOJA_
GATEWAY_ STATION_ OTHER - A kind this build does not model, readable only as its text.
- PAMOJA_
GATEWAY_ STATION_ PROPRIETARY - A frame of a kind this protocol does not describe, carried whole.
- PAMOJA_
GATEWAY_ STATION_ PROTOCOL_ VERSION - The protocol version a station reports.
- PAMOJA_
GATEWAY_ STATION_ ROUTER_ CONFIG - How the server tells the station to configure its radios.
- PAMOJA_
GATEWAY_ STATION_ SCHEDULE - Frames the server asks the station to transmit to a group.
- PAMOJA_
GATEWAY_ STATION_ TEXT_ FEATURES - What a version says the station can do, such as
gps. - PAMOJA_
GATEWAY_ STATION_ TEXT_ FIRMWARE - The firmware a version reports.
- PAMOJA_
GATEWAY_ STATION_ TEXT_ HWSPEC - The concentrator a configuration is written for, such as
sx1301/1. - PAMOJA_
GATEWAY_ STATION_ TEXT_ MODEL - The hardware model a version reports.
- PAMOJA_
GATEWAY_ STATION_ TEXT_ MSGTYPE - The word a message calls itself on the wire, which is what names a kind this build does not model.
- PAMOJA_
GATEWAY_ STATION_ TEXT_ PACKAGE - The package a version reports.
- PAMOJA_
GATEWAY_ STATION_ TEXT_ REGION - The region a configuration names, such as
EU868. - PAMOJA_
GATEWAY_ STATION_ TEXT_ STATION - The station software a version reports.
- PAMOJA_
GATEWAY_ STATION_ TIME_ SYNC - The clock the two keep between them.
- PAMOJA_
GATEWAY_ STATION_ TRANSMITTED - What became of a frame the station was asked to transmit.
- PAMOJA_
GATEWAY_ STATION_ UPLINK - A data frame the station heard.
- PAMOJA_
GATEWAY_ STATION_ VERSION - What the station reports about itself when a session opens.
Functions§
- pamoja_
gateway_ ⚠station_ discovery - Writes the request a station sends to find its network server.
- pamoja_
gateway_ ⚠station_ discovery_ parse - Reads the request a station sent to find its network server, as the server does.
- pamoja_
gateway_ ⚠station_ eui_ of - Reads an identifier written in any form the protocol accepts.
- pamoja_
gateway_ ⚠station_ heard - Reads a frame the radio heard into the message that reports it.
- pamoja_
gateway_ ⚠station_ id6 - Writes an identifier in the ID6 form the protocol prefers.
- pamoja_
gateway_ ⚠station_ message_ add_ broadcast - Adds a frame to a schedule.
- pamoja_
gateway_ ⚠station_ message_ add_ data_ rate - Adds the next number of a configuration’s data-rate table.
- pamoja_
gateway_ ⚠station_ message_ add_ join_ range - Adds a range of join identifiers whose join requests a configuration forwards.
- pamoja_
gateway_ ⚠station_ message_ add_ net_ id - Adds a network whose data frames a configuration forwards.
- pamoja_
gateway_ ⚠station_ message_ broadcast - Reads one frame of a schedule.
- pamoja_
gateway_ ⚠station_ message_ data_ rate - Reads one number of a configuration’s data-rate table.
- pamoja_
gateway_ ⚠station_ message_ fields - Reads the fixed fields a message carries, and how many entries each of its lists holds.
- pamoja_
gateway_ ⚠station_ message_ free - Releases a message.
- pamoja_
gateway_ ⚠station_ message_ join_ range - Reads one join identifier range a configuration names.
- pamoja_
gateway_ ⚠station_ message_ json - Writes a message as the websocket carries it.
- pamoja_
gateway_ ⚠station_ message_ kind - Returns which kind a message is.
- pamoja_
gateway_ ⚠station_ message_ net_ id - Reads one network a configuration names.
- pamoja_
gateway_ ⚠station_ message_ new - Builds a message of any kind from its fixed fields.
- pamoja_
gateway_ ⚠station_ message_ options - Returns the frame options a data frame carries.
- pamoja_
gateway_ ⚠station_ message_ parse - Reads a message that arrived over the websocket.
- pamoja_
gateway_ ⚠station_ message_ payload - Returns the bytes a message carries: the payload of a frame, or the frame to transmit.
- pamoja_
gateway_ ⚠station_ message_ set_ options - Sets the frame options a data frame carries.
- pamoja_
gateway_ ⚠station_ message_ set_ payload - Sets the bytes a message carries: the payload of a data frame or a proprietary frame, or the frame a downlink transmits.
- pamoja_
gateway_ ⚠station_ message_ set_ text - Sets a piece of text a message carries.
- pamoja_
gateway_ ⚠station_ message_ text - Returns a piece of text a message carries.
- pamoja_
gateway_ ⚠station_ router_ accepted - Writes the answer that sends a station to the websocket its session runs on.
- pamoja_
gateway_ ⚠station_ router_ identities - Reads the identities a discovery answer names: the station, and the server endpoint that carries its session.
- pamoja_
gateway_ ⚠station_ router_ parse - Reads the answer a discovery endpoint gives.
- pamoja_
gateway_ ⚠station_ router_ refused - Writes the answer that refuses a station, saying why.
- pamoja_
gateway_ ⚠station_ xtime - Builds a station clock value from the radio it was read on, the run of the station, and the microseconds that run had counted.
- pamoja_
gateway_ ⚠station_ xtime_ parts - Takes a station clock value apart into its radio unit, run, and microseconds.