Go to the documentation of this file.
32 #define TRACE_LEVEL COAP_TRACE_LEVEL
42 #if (COAP_CLIENT_SUPPORT == ENABLED || COAP_SERVER_SUPPORT == ENABLED)
124 #if (COAP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
194 TRACE_DEBUG(
" Version = %" PRIu8
"\r\n", header->version);
197 TRACE_DEBUG(
" Type = %" PRIu8
" (%s)\r\n", header->type,
201 TRACE_DEBUG(
" Token Length = %" PRIu8
"\r\n", header->tokenLen);
204 TRACE_DEBUG(
" Code = %" PRIu8
".%02" PRIu8
" (%s)\r\n",
205 header->code / 32, header->code & 31,
290 #if (COAP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
300 if(optionParams != NULL)
313 for(i = 0; i < option->
length; i++)
348 TRACE_DEBUG(
" %" PRIu32
"/%" PRIu32
"/%" PRIu32
"\r\n",
364 for(i = 0; i < option->
length; i++)
381 TRACE_DEBUG(
" Option %" PRIu16
" (%" PRIu16
" bytes)\r\n",
408 static const char_t defaultName[] =
"Unknown";
411 for(i = 0; i < paramListLen; i++)
414 return paramList[i].
name;
const CoapParamName coapCodeList[]
CoapOptionFormat format
Option format.
@ COAP_CODE_REQUEST_ENTITY_INCOMPLETE
@ COAP_CODE_METHOD_NOT_ALLOWED
@ COAP_CODE_UNSUPPORTED_CONTENT_FORMAT
@ COAP_CODE_SERVICE_UNAVAILABLE
@ COAP_CONTENT_FORMAT_APP_OCTET_STREAM
@ COAP_CODE_PROXYING_NOT_SUPPORTED
@ COAP_OPT_FORMAT_UINT
Non-negative integer.
#define COAP_PAYLOAD_MARKER
error_t coapDumpOption(const CoapOption *option)
Dump CoAP option.
const char_t * name
Option name.
const CoapParamName coapContentFormatList[]
#define COAP_GET_BLOCK_NUM(value)
@ COAP_OPT_CONTENT_FORMAT
@ COAP_OPT_FORMAT_STRING
UTF-8 string.
@ COAP_CODE_REQUEST_ENTITY_TO_LARGE
@ COAP_CONTENT_FORMAT_APP_LINK_FORMAT
error_t coapDumpMessageHeader(const uint8_t *p, size_t length, size_t *consumed)
Dump CoAP message header.
@ COAP_CODE_PRECONDITION_FAILED
@ COAP_CODE_GATEWAY_TIMEOUT
const CoapOptionParameters * coapGetOptionParameters(uint16_t optionNum)
Retrieve parameters for a given option number.
@ COAP_CODE_UNPROCESSABLE_ENTITY
#define COAP_GET_BLOCK_M(value)
@ COAP_CODE_NOT_ACCEPTABLE
@ COAP_CODE_NOT_IMPLEMENTED
@ COAP_CONTENT_FORMAT_APP_JSON
Parameter value/name binding.
@ COAP_TYPE_ACK
Acknowledgment message.
const CoapParamName coapTypeList[]
@ COAP_OBSERVE_DEREGISTER
@ COAP_CONTENT_FORMAT_APP_EXI
@ COAP_TYPE_CON
Confirmable message.
@ COAP_CONTENT_FORMAT_APP_XML
@ COAP_TYPE_RST
Reset message.
error_t coapDumpOptions(const uint8_t *p, size_t length, size_t *consumed)
Dump the list of CoAP options.
const char_t * coapGetParamName(uint_t value, const CoapParamName *paramList, size_t paramListLen)
Convert a parameter to string representation.
const CoapParamName coapObserveList[]
#define TRACE_DEBUG_ARRAY(p, a, n)
Data logging functions for debugging purpose (CoAP)
@ COAP_CODE_INTERNAL_SERVER
@ COAP_CONTENT_FORMAT_TEXT_PLAIN
error_t coapParseOption(const uint8_t *p, size_t length, uint16_t prevOptionNum, CoapOption *option, size_t *consumed)
Parse CoAP option.
@ COAP_TYPE_NON
Non-confirmable message.
#define COAP_GET_BLOCK_SZX(value)
error_t coapDumpMessage(const void *message, size_t length)
Dump CoAP message for debugging purpose.