Lines Matching defs:delta
51 result->delta = (*opt & 0xf0) >> 4;
54 switch (result->delta) {
57 coap_log_debug("ignored reserved option delta 15\n");
61 /* Handle two-byte value: First, the MSB + 269 is stored as delta value.
63 * just like case delta == 13. */
65 result->delta = ((*opt & 0xff) << 8) + 269;
66 if (result->delta < 269) {
67 coap_log_debug("delta too large\n");
73 result->delta += *opt & 0xff;
85 /* Handle two-byte value: First, the MSB + 269 is stored as delta value.
87 * just like case delta == 13. */
180 oi->number += option.delta;
218 coap_log_debug("illegal option delta\n");
254 coap_log_debug("illegal option delta\n");
293 uint16_t delta, size_t length) {
301 if (delta < 13) {
302 opt[0] = (coap_opt_t)(delta << 4);
303 } else if (delta < 269) {
305 coap_log_debug("insufficient space to encode option delta %d\n",
306 delta);
311 opt[++skip] = (coap_opt_t)(delta - 13);
314 coap_log_debug("insufficient space to encode option delta %d\n",
315 delta);
320 opt[++skip] = ((delta - 269) >> 8) & 0xff;
321 opt[++skip] = (delta - 269) & 0xff;
337 coap_log_debug("insufficient space to encode option delta %d\n",
338 delta);
351 coap_opt_encode_size(uint16_t delta, size_t length) {
354 if (delta >= 13) {
355 if (delta < 269)
372 coap_opt_encode(coap_opt_t *opt, size_t maxlen, uint16_t delta,
376 l = coap_opt_setheader(opt, maxlen, delta, length);
559 /* sort options for delta encoding */