Lines Matching +full:resource +full:- +full:id
5 * SPDX-License-Identifier: Apache-2.0
20 static int send_notification_packet(struct coap_resource *resource, in send_notification_packet() argument
23 uint16_t age, uint16_t id, in send_notification_packet() argument
40 id = coap_next_id(); in send_notification_packet()
45 COAP_RESPONSE_CODE_CONTENT, id); in send_notification_packet()
68 /* The response that coap-client expects */ in send_notification_packet()
83 r = coap_resource_send(resource, &response, addr, addr_len, NULL); in send_notification_packet()
88 static int obs_get(struct coap_resource *resource, in obs_get() argument
93 uint16_t id; in obs_get() local
99 r = coap_resource_parse_observe(resource, request, addr); in obs_get()
103 id = coap_header_get_id(request); in obs_get()
107 LOG_INF("type: %u code %u id %u", type, code, id); in obs_get()
110 return send_notification_packet(resource, addr, addr_len, in obs_get()
111 r == 0 ? resource->age : 0, in obs_get()
112 id, token, tkl, true); in obs_get()
115 static void obs_notify(struct coap_resource *resource, in obs_notify() argument
118 send_notification_packet(resource, in obs_notify()
119 &observer->addr, in obs_notify()
120 sizeof(observer->addr), in obs_notify()
121 resource->age, 0, in obs_notify()
122 observer->token, observer->tkl, false); in obs_notify()