8 #include <satcat5/coap_endpoint.h>
9 #include <satcat5/pkt_buffer.h>
31 const char* uri,
const char* data,
32 u16 fmt = satcat5::coap::FORMAT_TEXT);
35 u16 fmt = satcat5::coap::FORMAT_BYTES);
Creates an ephemeral writer for the Concise Binary Object Representation (CBOR, IETF RFC8949),...
Implemention of "net::Dispatch" API for CCSDS-SPP packets.
CoAP request/response handling for a single client-server connection.
Variant of coap::Connection for UDP connections.
CoAP endpoint (i.e., client, server, or combined client+server).
satcat5::net::Dispatch * iface() const
Fetch the associated network interface.
Connection manager for CoAP endpoints using CCSDS-SPP.
Connection manager for CoAP endpoints using UDP.
Base-class for parsing CoAP message headers and options.
Simplified CoAP client that writes responses to a PacketBuffer.
satcat5::io::Readable * response_data()
Read the contents of the next CoAP response.
bool request(satcat5::coap::Code code, const char *uri, const char *data, u16 fmt=satcat5::coap::FORMAT_TEXT)
Create and send a CoAP request, with optional data.
void set_callback(satcat5::io::EventListener *obj)
Request notifications for incoming responses.
SimpleClient(satcat5::net::Dispatch *iface)
Constructor attaches to a network interface.
bool response_discard()
Discard the contents of the next CoAP response.
u16 msg_id() const
Message-ID and token for the most recent request.
satcat5::io::Readable * response_all()
Read full header and contents of the next CoAP response.
void coap_response(satcat5::coap::Connection *obj, satcat5::coap::Reader *msg) override
Save the incoming response message.
Variant of SimpleClient using a single outgoing SPP connection.
Variant of SimpleClient using a single outgoing UDP connection.
Event-handler interface for newly received data.
Abstract API for reading byte-streams and packets.
virtual void set_callback(satcat5::io::EventListener *callback)
Update registered callback for data_rcvd() events.
The "Dispatch" is a generic interface that knows how to read a designated protocol layer and sort inc...
Dispatcher sorts incoming UDP messages by port index.
CoAP message header CODE field (Section 12.1).