Expand description
The C ABI for CoAP.
These functions wrap [pamoja_coap] for callers that reach the SDK through
the flat C boundary. CoAP is the transport for links where MQTT is more than
the budget allows: it runs over UDP, its headers are a handful of bytes, and
a node can fire a reading and forget it rather than holding a session open.
A client holds a socket and a background loop, so it crosses as an opaque
handle and every call blocks on the shared runtime. To use CoAP as one rung
of a ladder rather than driving it directly, build a
PamojaTransport with
pamoja_transport_coap instead.
Structs§
- Pamoja
Coap Client - An opaque handle to a CoAP endpoint.
- Pamoja
Coap Config - The settings a CoAP endpoint is built from.
- Pamoja
Coap Server - An opaque handle to a CoAP server.
Enums§
- Pamoja
Coap Reliability - Whether a CoAP request is acknowledged and retried.
Functions§
- pamoja_
coap_ ⚠client_ connect - Binds the local socket so the endpoint can carry traffic.
- pamoja_
coap_ ⚠client_ disconnect - Releases the socket the endpoint holds.
- pamoja_
coap_ ⚠client_ free - Releases a CoAP endpoint handle.
- pamoja_
coap_ ⚠client_ is_ connected - Reports whether the endpoint is bound.
- pamoja_
coap_ ⚠client_ new - Creates a disconnected CoAP endpoint from the given settings.
- pamoja_
coap_ ⚠client_ recv - Waits for the next message on an observed path.
- pamoja_
coap_ ⚠client_ recv_ within - Waits a limited time for the next message on an observed path.
- pamoja_
coap_ ⚠client_ send - Sends a payload to a resource path.
- pamoja_
coap_ ⚠client_ subscribe - Observes a resource path, so messages published to it arrive at
pamoja_coap_client_recv. - pamoja_
coap_ ⚠server_ connect - Binds the server’s socket and starts answering requests.
- pamoja_
coap_ ⚠server_ disconnect - Closes the server’s socket, keeping its resources and filters.
- pamoja_
coap_ ⚠server_ free - Releases a CoAP server handle.
- pamoja_
coap_ ⚠server_ is_ connected - Reports whether the server holds a bound socket.
- pamoja_
coap_ ⚠server_ local_ port - The port the server listens on, which names the one the system chose when it bound port 0.
- pamoja_
coap_ ⚠server_ new - Creates a CoAP server that will listen on a local address.
- pamoja_
coap_ ⚠server_ observers - Counts the clients observing a resource.
- pamoja_
coap_ ⚠server_ recv - Waits for the next reading sent to a path the server takes.
- pamoja_
coap_ ⚠server_ recv_ within - Waits a limited time for the next reading sent to a path the server takes.
- pamoja_
coap_ ⚠server_ send - Sets the state of a resource and notifies every observer of it.
- pamoja_
coap_ ⚠server_ subscribe - Takes the readings sent to the paths a filter matches.
- pamoja_
transport_ ⚠coap - Creates a CoAP transport for composing into a ladder or a wrapper.