Lines Matching refs:params

81 				       struct mqtt_sn_param_searchgw *params)  in mqtt_sn_encode_msg_searchgw()  argument
91 net_buf_simple_add_u8(buf, params->radius); in mqtt_sn_encode_msg_searchgw()
97 struct mqtt_sn_param_gwinfo *params) in mqtt_sn_encode_msg_gwinfo() argument
99 size_t msgsz = 1 + params->gw_add.size; in mqtt_sn_encode_msg_gwinfo()
107 net_buf_simple_add_u8(buf, params->gw_id); in mqtt_sn_encode_msg_gwinfo()
108 net_buf_simple_add_data(buf, &params->gw_add); in mqtt_sn_encode_msg_gwinfo()
114 struct mqtt_sn_param_connect *params) in mqtt_sn_encode_msg_connect() argument
116 size_t msgsz = 4 + params->client_id.size; in mqtt_sn_encode_msg_connect()
117 struct mqtt_sn_flags flags = {.will = params->will, .clean_session = params->clean_session}; in mqtt_sn_encode_msg_connect()
129 net_buf_simple_add_be16(buf, params->duration); in mqtt_sn_encode_msg_connect()
131 net_buf_simple_add_data(buf, &params->client_id); in mqtt_sn_encode_msg_connect()
137 struct mqtt_sn_param_willtopic *params) in mqtt_sn_encode_msg_willtopic() argument
139 size_t msgsz = 1 + params->topic.size; in mqtt_sn_encode_msg_willtopic()
140 struct mqtt_sn_flags flags = {.qos = params->qos, .retain = params->retain}; in mqtt_sn_encode_msg_willtopic()
150 net_buf_simple_add_data(buf, &params->topic); in mqtt_sn_encode_msg_willtopic()
156 struct mqtt_sn_param_willmsg *params) in mqtt_sn_encode_msg_willmsg() argument
158 size_t msgsz = params->msg.size; in mqtt_sn_encode_msg_willmsg()
166 net_buf_simple_add_data(buf, &params->msg); in mqtt_sn_encode_msg_willmsg()
172 struct mqtt_sn_param_register *params) in mqtt_sn_encode_msg_register() argument
174 size_t msgsz = 4 + params->topic.size; in mqtt_sn_encode_msg_register()
184 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_register()
185 net_buf_simple_add_data(buf, &params->topic); in mqtt_sn_encode_msg_register()
191 struct mqtt_sn_param_regack *params) in mqtt_sn_encode_msg_regack() argument
201 net_buf_simple_add_be16(buf, params->topic_id); in mqtt_sn_encode_msg_regack()
202 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_regack()
203 net_buf_simple_add_u8(buf, params->ret_code); in mqtt_sn_encode_msg_regack()
209 struct mqtt_sn_param_publish *params) in mqtt_sn_encode_msg_publish() argument
211 size_t msgsz = 5 + params->data.size; in mqtt_sn_encode_msg_publish()
212 struct mqtt_sn_flags flags = {.dup = params->dup, in mqtt_sn_encode_msg_publish()
213 .retain = params->retain, in mqtt_sn_encode_msg_publish()
214 .qos = params->qos, in mqtt_sn_encode_msg_publish()
215 .topic_type = params->topic_type}; in mqtt_sn_encode_msg_publish()
224 net_buf_simple_add_be16(buf, params->topic_id); in mqtt_sn_encode_msg_publish()
226 if (params->qos == MQTT_SN_QOS_1 || params->qos == MQTT_SN_QOS_2) { in mqtt_sn_encode_msg_publish()
227 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_publish()
233 net_buf_simple_add_data(buf, &params->data); in mqtt_sn_encode_msg_publish()
239 struct mqtt_sn_param_puback *params) in mqtt_sn_encode_msg_puback() argument
249 net_buf_simple_add_be16(buf, params->topic_id); in mqtt_sn_encode_msg_puback()
250 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_puback()
251 net_buf_simple_add_u8(buf, params->ret_code); in mqtt_sn_encode_msg_puback()
257 struct mqtt_sn_param_pubrec *params) in mqtt_sn_encode_msg_pubrec() argument
267 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_pubrec()
273 struct mqtt_sn_param_pubrel *params) in mqtt_sn_encode_msg_pubrel() argument
283 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_pubrel()
289 struct mqtt_sn_param_pubcomp *params) in mqtt_sn_encode_msg_pubcomp() argument
299 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_pubcomp()
305 struct mqtt_sn_param_subscribe *params) in mqtt_sn_encode_msg_subscribe() argument
310 .dup = params->dup, .qos = params->qos, .topic_type = params->topic_type}; in mqtt_sn_encode_msg_subscribe()
313 if (params->topic_type == MQTT_SN_TOPIC_TYPE_NORMAL) { in mqtt_sn_encode_msg_subscribe()
314 msgsz += params->topic.topic_name.size; in mqtt_sn_encode_msg_subscribe()
325 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_subscribe()
327 if (params->topic_type == MQTT_SN_TOPIC_TYPE_NORMAL) { in mqtt_sn_encode_msg_subscribe()
328 net_buf_simple_add_data(buf, &params->topic.topic_name); in mqtt_sn_encode_msg_subscribe()
330 net_buf_simple_add_be16(buf, params->topic.topic_id); in mqtt_sn_encode_msg_subscribe()
337 struct mqtt_sn_param_unsubscribe *params) in mqtt_sn_encode_msg_unsubscribe() argument
341 struct mqtt_sn_flags flags = {.topic_type = params->topic_type}; in mqtt_sn_encode_msg_unsubscribe()
343 if (params->topic_type == MQTT_SN_TOPIC_TYPE_NORMAL) { in mqtt_sn_encode_msg_unsubscribe()
344 msgsz += params->topic.topic_name.size; in mqtt_sn_encode_msg_unsubscribe()
356 net_buf_simple_add_be16(buf, params->msg_id); in mqtt_sn_encode_msg_unsubscribe()
358 if (params->topic_type == MQTT_SN_TOPIC_TYPE_NORMAL) { in mqtt_sn_encode_msg_unsubscribe()
359 net_buf_simple_add_data(buf, &params->topic.topic_name); in mqtt_sn_encode_msg_unsubscribe()
361 net_buf_simple_add_be16(buf, params->topic.topic_id); in mqtt_sn_encode_msg_unsubscribe()
368 struct mqtt_sn_param_pingreq *params) in mqtt_sn_encode_msg_pingreq() argument
370 size_t msgsz = params->client_id.size; in mqtt_sn_encode_msg_pingreq()
378 if (params->client_id.size) { in mqtt_sn_encode_msg_pingreq()
379 net_buf_simple_add_data(buf, &params->client_id); in mqtt_sn_encode_msg_pingreq()
391 struct mqtt_sn_param_disconnect *params) in mqtt_sn_encode_msg_disconnect() argument
393 size_t msgsz = params->duration ? 2 : 0; in mqtt_sn_encode_msg_disconnect()
401 if (params->duration) { in mqtt_sn_encode_msg_disconnect()
402 net_buf_simple_add_be16(buf, params->duration); in mqtt_sn_encode_msg_disconnect()
409 struct mqtt_sn_param_willtopicupd *params) in mqtt_sn_encode_msg_willtopicupd() argument
412 struct mqtt_sn_flags flags = {.qos = params->qos, .retain = params->retain}; in mqtt_sn_encode_msg_willtopicupd()
415 if (params->topic.size) { in mqtt_sn_encode_msg_willtopicupd()
416 msgsz += 1 + params->topic.size; in mqtt_sn_encode_msg_willtopicupd()
425 if (params->topic.size) { in mqtt_sn_encode_msg_willtopicupd()
428 net_buf_simple_add_data(buf, &params->topic); in mqtt_sn_encode_msg_willtopicupd()
435 struct mqtt_sn_param_willmsgupd *params) in mqtt_sn_encode_msg_willmsgupd() argument
437 size_t msgsz = params->msg.size; in mqtt_sn_encode_msg_willmsgupd()
445 net_buf_simple_add_data(buf, &params->msg); in mqtt_sn_encode_msg_willmsgupd()
463 result = mqtt_sn_encode_msg_searchgw(buf, &param->params.searchgw); in mqtt_sn_encode_msg()
466 result = mqtt_sn_encode_msg_gwinfo(buf, &param->params.gwinfo); in mqtt_sn_encode_msg()
469 result = mqtt_sn_encode_msg_connect(buf, &param->params.connect); in mqtt_sn_encode_msg()
472 result = mqtt_sn_encode_msg_willtopic(buf, &param->params.willtopic); in mqtt_sn_encode_msg()
475 result = mqtt_sn_encode_msg_willmsg(buf, &param->params.willmsg); in mqtt_sn_encode_msg()
478 result = mqtt_sn_encode_msg_register(buf, &param->params.reg); in mqtt_sn_encode_msg()
481 result = mqtt_sn_encode_msg_regack(buf, &param->params.regack); in mqtt_sn_encode_msg()
484 result = mqtt_sn_encode_msg_publish(buf, &param->params.publish); in mqtt_sn_encode_msg()
487 result = mqtt_sn_encode_msg_puback(buf, &param->params.puback); in mqtt_sn_encode_msg()
490 result = mqtt_sn_encode_msg_pubrec(buf, &param->params.pubrec); in mqtt_sn_encode_msg()
493 result = mqtt_sn_encode_msg_pubrel(buf, &param->params.pubrel); in mqtt_sn_encode_msg()
496 result = mqtt_sn_encode_msg_pubcomp(buf, &param->params.pubcomp); in mqtt_sn_encode_msg()
499 result = mqtt_sn_encode_msg_subscribe(buf, &param->params.subscribe); in mqtt_sn_encode_msg()
502 result = mqtt_sn_encode_msg_unsubscribe(buf, &param->params.unsubscribe); in mqtt_sn_encode_msg()
505 result = mqtt_sn_encode_msg_pingreq(buf, &param->params.pingreq); in mqtt_sn_encode_msg()
511 result = mqtt_sn_encode_msg_disconnect(buf, &param->params.disconnect); in mqtt_sn_encode_msg()
514 result = mqtt_sn_encode_msg_willtopicupd(buf, &param->params.willtopicupd); in mqtt_sn_encode_msg()
517 result = mqtt_sn_encode_msg_willmsgupd(buf, &param->params.willmsgupd); in mqtt_sn_encode_msg()