|
SatCat5
|
Resource that returns a fixed status code for all requests.
This is usually set to an error code such as 4.03 Forbidden.
Definition at line 128 of file coap_resource.h.
#include <coap_resource.h>
Public Member Functions | |
| constexpr | ResourceError (const char *uri_path, Code errcode) |
| Constructor (user calls add_resource). | |
| ResourceError (ResourceServer *server, const char *uri_path, Code errcode) | |
| Constructor (parent class calls add_resource). | |
| bool | operator== (const Resource &other) const |
| Comparison operators for comparing two URI-paths. | |
| bool | operator!= (const Resource &other) const |
| Comparison operators for comparing two URI-paths. | |
| satcat5::ip::Dispatch * | ip () const |
| Pointer to the parent's network interface. | |
| satcat5::udp::Dispatch * | udp () const |
| Pointer to the parent's network interface. | |
Static Protected Member Functions | |
| static constexpr const char * | normalize_uri (const char *uri) |
| Remove leading slash from a user-provided path. | |
Protected Attributes | |
| const char *const | m_uri_path |
| URI-Path for this resource. | |
| ResourceServer *const | m_server |
| Optional pointer to the server object. | |
Private Attributes | |
| Resource * | m_next |
| const satcat5::coap::Code | m_errcode |
| All request types respond with the specified error code. | |
| bool | request_get (Connection *obj, Reader *msg) override |
| All request types respond with the specified error code. | |
| bool | request_post (Connection *obj, Reader *msg) override |
| All request types respond with the specified error code. | |
| bool | request_put (Connection *obj, Reader *msg) override |
| All request types respond with the specified error code. | |
| bool | request_delete (Connection *obj, Reader *msg) override |
| All request types respond with the specified error code. | |