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.
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_ 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_
transport_ ⚠coap - Creates a CoAP transport for composing into a ladder or a wrapper.