Home
last modified time | relevance | path

Searched refs:pub (Results 1 – 25 of 46) sorted by relevance

12

/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/
Dpublisher.c27 bt_mesh_model_msg_init(root_models[3].pub->msg, in publish()
29 net_buf_simple_add_u8(root_models[3].pub->msg, 0x01); in publish()
30 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
33 bt_mesh_model_msg_init(root_models[3].pub->msg, in publish()
35 net_buf_simple_add_u8(root_models[3].pub->msg, 0x01); in publish()
36 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
37 net_buf_simple_add_u8(root_models[3].pub->msg, 0x45); in publish()
38 net_buf_simple_add_u8(root_models[3].pub->msg, 0x28); in publish()
41 bt_mesh_model_msg_init(vnd_models[0].pub->msg, in publish()
43 net_buf_simple_add_le16(vnd_models[0].pub->msg, 0x0001); in publish()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dheartbeat.c33 static struct bt_mesh_hb_pub pub; variable
42 cb->pub_sent(&pub); in notify_pub_sent()
61 if (pub.period && pub.count > 1) { in hb_publish_end_cb()
62 k_work_reschedule(&pub_timer, K_SECONDS(pub.period)); in hb_publish_end_cb()
65 if (pub.count != 0xffff) { in hb_publish_end_cb()
66 pub.count--; in hb_publish_end_cb()
109 .net_idx = pub.net_idx, in heartbeat_send()
111 .addr = pub.dst, in heartbeat_send()
112 .send_ttl = pub.ttl, in heartbeat_send()
115 .sub = bt_mesh_subnet_get(pub.net_idx), in heartbeat_send()
[all …]
Daccess.c715 if (!mod->pub) { in bt_mesh_model_pub_period_get()
719 switch (mod->pub->period >> 6) { in bt_mesh_model_pub_period_get()
722 period = (mod->pub->period & BIT_MASK(6)) * 100U; in bt_mesh_model_pub_period_get()
726 period = (mod->pub->period & BIT_MASK(6)) * MSEC_PER_SEC; in bt_mesh_model_pub_period_get()
730 period = (mod->pub->period & BIT_MASK(6)) * 10U * MSEC_PER_SEC; in bt_mesh_model_pub_period_get()
734 period = (mod->pub->period & BIT_MASK(6)) * 600U * MSEC_PER_SEC; in bt_mesh_model_pub_period_get()
740 if (mod->pub->fast_period) { in bt_mesh_model_pub_period_get()
745 return MAX(period >> mod->pub->period_div, 100); in bt_mesh_model_pub_period_get()
753 struct bt_mesh_model_pub *pub = mod->pub; in next_period() local
757 elapsed = k_uptime_get_32() - pub->period_start; in next_period()
[all …]
Dcfg_cli.c722 struct bt_mesh_cfg_cli_mod_pub *pub; member
732 struct bt_mesh_cfg_cli_mod_pub pub; in mod_pub_status() local
747 pub.addr = net_buf_simple_pull_le16(buf); in mod_pub_status()
748 pub.app_idx = net_buf_simple_pull_le16(buf); in mod_pub_status()
749 pub.cred_flag = (pub.app_idx & BIT(12)); in mod_pub_status()
750 pub.app_idx &= BIT_MASK(12); in mod_pub_status()
751 pub.ttl = net_buf_simple_pull_u8(buf); in mod_pub_status()
752 pub.period = net_buf_simple_pull_u8(buf); in mod_pub_status()
753 pub.transmit = net_buf_simple_pull_u8(buf); in mod_pub_status()
781 if (param->pub) { in mod_pub_status()
[all …]
Dmsg.c93 if (!ctx && !model->pub) { in bt_mesh_msg_send()
101 net_buf_simple_reset(model->pub->msg); in bt_mesh_msg_send()
102 net_buf_simple_add_mem(model->pub->msg, buf->data, buf->len); in bt_mesh_msg_send()
114 ctx ? ctx->addr : model->pub->addr, in bt_mesh_msg_ackd_send()
Dcfg_srv.c119 if (!model->pub) { in _mod_pub_set()
127 if (!model->pub->update && period) { in _mod_pub_set()
132 if (model->pub->addr == BT_MESH_ADDR_UNASSIGNED) { in _mod_pub_set()
136 model->pub->addr = BT_MESH_ADDR_UNASSIGNED; in _mod_pub_set()
137 model->pub->key = 0U; in _mod_pub_set()
138 model->pub->cred = 0U; in _mod_pub_set()
139 model->pub->ttl = 0U; in _mod_pub_set()
140 model->pub->period = 0U; in _mod_pub_set()
141 model->pub->retransmit = 0U; in _mod_pub_set()
142 model->pub->count = 0U; in _mod_pub_set()
[all …]
Dhealth_srv.c301 net_buf_simple_add_u8(&msg, model->pub->period_div); in send_health_period_status()
333 model->pub->period_div = period; in health_period_set_unrel()
371 struct bt_mesh_model_pub *pub = mod->pub; in health_pub_update() local
376 count = health_get_current(mod, pub->msg); in health_pub_update()
378 pub->fast_period = 1U; in health_pub_update()
380 pub->fast_period = 0U; in health_pub_update()
429 if (!model->pub) { in health_srv_init()
434 model->pub->update = health_pub_update; in health_srv_init()
Dmain.c425 if (mod->pub && mod->pub->update) { in model_suspend()
426 mod->pub->count = 0U; in model_suspend()
430 (void)k_work_cancel_delayable(&mod->pub->timer); in model_suspend()
494 if (mod->pub && mod->pub->update) { in model_resume()
498 k_work_reschedule(&mod->pub->timer, in model_resume()
/Zephyr-latest/subsys/net/lib/mqtt_sn/
Dmqtt_sn.c157 static void mqtt_sn_publish_destroy(struct mqtt_sn_client *client, struct mqtt_sn_publish *pub) in mqtt_sn_publish_destroy() argument
159 sys_slist_find_and_remove(&client->publish, &pub->next); in mqtt_sn_publish_destroy()
160 k_mem_slab_free(&publishes, (void *)pub); in mqtt_sn_publish_destroy()
165 struct mqtt_sn_publish *pub; in mqtt_sn_publish_destroy_all() local
169 pub = SYS_SLIST_CONTAINER(next, pub, next); in mqtt_sn_publish_destroy_all()
170 k_mem_slab_free(&publishes, (void *)pub); in mqtt_sn_publish_destroy_all()
176 struct mqtt_sn_publish *pub; in mqtt_sn_publish_create() local
178 if (k_mem_slab_alloc(&publishes, (void **)&pub, K_NO_WAIT)) { in mqtt_sn_publish_create()
183 memset(pub, 0, sizeof(*pub)); in mqtt_sn_publish_create()
186 if (data->size > sizeof(pub->pubdata)) { in mqtt_sn_publish_create()
[all …]
/Zephyr-latest/tests/crypto/tinycrypt/src/
Decc_dh.c75 unsigned int pub[2 * NUM_ECC_WORDS]; in ecdh_vectors() local
87 string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qx_vec[i]); in ecdh_vectors()
88 string2scalar(pub, NUM_ECC_WORDS, qy_vec[i]); in ecdh_vectors()
93 uECC_vli_nativeToBytes(pub_bytes, 2 * NUM_ECC_BYTES, pub); in ecdh_vectors()
302 unsigned int pub[2 * NUM_ECC_WORDS]; in pkv_vectors() local
317 string2scalar(pub, NUM_ECC_WORDS, qx_vec[i]); in pkv_vectors()
318 string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qy_vec[i]); in pkv_vectors()
320 uECC_vli_nativeToBytes(_public, NUM_ECC_BYTES, pub); in pkv_vectors()
322 NUM_ECC_BYTES, pub + NUM_ECC_WORDS); in pkv_vectors()
Dtest_ecc_utils.c165 unsigned int pub[2 * NUM_ECC_WORDS]; in keygen_vectors() local
192 uECC_vli_bytesToNative(pub, pub_bytes, NUM_ECC_BYTES); in keygen_vectors()
193 uECC_vli_bytesToNative(pub + NUM_ECC_WORDS, pub_bytes + NUM_ECC_BYTES, NUM_ECC_BYTES); in keygen_vectors()
200 result = check_ecc_result(i, "pub.x", exp_pub, pub, NUM_ECC_WORDS, verbose); in keygen_vectors()
204 …result = check_ecc_result(i, "pub.y", exp_pub + NUM_ECC_WORDS, pub + NUM_ECC_WORDS, NUM_ECC_WORDS… in keygen_vectors()
Decc_dsa.c347 unsigned int pub[2 * NUM_ECC_WORDS]; in vrfy_vectors() local
363 string2scalar(pub, NUM_ECC_WORDS, qx_vec[i]); in vrfy_vectors()
364 string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qy_vec[i]); in vrfy_vectors()
391 uECC_vli_nativeToBytes(pub_bytes, NUM_ECC_BYTES, pub); in vrfy_vectors()
393 pub + NUM_ECC_WORDS); in vrfy_vectors()
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Dmsg.h151 #define BT_MESH_MSG_CTX_INIT_PUB(pub) \ argument
153 .app_idx = (pub)->key, \
154 .addr = (pub)->addr, \
155 .send_ttl = (pub)->ttl, \
156 .uuid = (pub)->uuid, \
Daccess.h440 .pub = _pub, \
474 .pub = _pub, \
521 .pub = _pub, \
578 .pub = _pub, \
690 #define BT_MESH_PUB_MSG_TOTAL(pub) (BT_MESH_PUB_TRANSMIT_COUNT((pub)->retransmit) + 1) argument
701 #define BT_MESH_PUB_MSG_NUM(pub) (BT_MESH_PUB_TRANSMIT_COUNT((pub)->retransmit) + 1 - (pub)->count) argument
914 struct bt_mesh_model_pub * const pub; member
1006 return model->pub->count != BT_MESH_PUB_TRANSMIT_COUNT(model->pub->retransmit); in bt_mesh_model_pub_is_retransmission()
Dsar_cfg_cli.h33 struct bt_mesh_model_pub pub; member
50 _bt_mesh_sar_cfg_cli_op, _cli.pub, _cli, \
Dhealth_srv.h175 #define BT_MESH_MODEL_HEALTH_SRV(srv, pub, ...) \ argument
178 pub, \
Dhealth_cli.h32 struct bt_mesh_model_pub pub; member
129 &(cli_data)->pub, cli_data, &bt_mesh_health_cli_cb)
Dcfg_cli.h65 struct bt_mesh_cfg_cli_mod_pub *pub);
317 struct bt_mesh_cfg_cli_hb_pub *pub);
1026 uint16_t mod_id, struct bt_mesh_cfg_cli_mod_pub *pub,
1047 struct bt_mesh_cfg_cli_mod_pub *pub, uint8_t *status);
1067 uint16_t mod_id, struct bt_mesh_cfg_cli_mod_pub *pub,
1090 struct bt_mesh_cfg_cli_mod_pub *pub, uint8_t *status);
1443 const struct bt_mesh_cfg_cli_hb_pub *pub, uint8_t *status);
1458 int bt_mesh_cfg_cli_hb_pub_get(uint16_t net_idx, uint16_t addr, struct bt_mesh_cfg_cli_hb_pub *pub,
Dheartbeat.h112 void (*pub_sent)(const struct bt_mesh_hb_pub *pub);
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_heartbeat.c108 static void pub_hb_sent_cb(const struct bt_mesh_hb_pub *pub) in pub_hb_sent_cb() argument
114 ASSERT_EQUAL(pub_addr, pub->dst); in pub_hb_sent_cb()
115 ASSERT_EQUAL(pub_cnt, pub->count); in pub_hb_sent_cb()
116 ASSERT_EQUAL(PUBLISH_PERIOD_SEC, pub->period); in pub_hb_sent_cb()
117 ASSERT_EQUAL(0, pub->net_idx); in pub_hb_sent_cb()
118 ASSERT_EQUAL(PUBLISH_TTL, pub->ttl); in pub_hb_sent_cb()
119 ASSERT_EQUAL(BT_MESH_FEAT_SUPPORTED, pub->feat); in pub_hb_sent_cb()
Dtest_suspend.c54 model->pub->msg->data[1]++; in model_1_update()
55 LOG_DBG("Model 1 publishing..., n: %d", model->pub->msg->data[1]); in model_1_update()
150 bt_mesh_model_msg_init(model->pub->msg, TEST_MESSAGE_OP); in model_1_init()
151 net_buf_simple_add_u8(model->pub->msg, 1); in model_1_init()
483 TEST_CASE(tester, pub, "Scan and verify behavior of periodic publishing adv"),
Dtest_access.c109 model->pub->msg->data[1]++; in model1_update()
110 LOG_DBG("New pub: n: %d t: %d", model->pub->msg->data[1], k_uptime_get_32()); in model1_update()
525 bt_mesh_model_msg_init(model->pub->msg, TEST_MESSAGE_OP_F); in msgf_publish()
526 net_buf_simple_add_u8(model->pub->msg, 1); in msgf_publish()
694 model->pub->delayable = delayable; in tx_period()
699 model->pub->fast_period = test_period[i].div > 0; in tx_period()
700 model->pub->period_div = test_period[i].div; in tx_period()
795 model->pub->retr_update = true; in tx_transmit()
796 model->pub->delayable = delayable; in tx_transmit()
882 model->pub->retr_update = true; in test_tx_cancel()
/Zephyr-latest/subsys/bluetooth/mesh/shell/
Dcfg.c1495 struct bt_mesh_cfg_cli_mod_pub pub; in mod_pub_get() local
1501 bt_mesh_shell_target_ctx.dst, addr, mod_id, &pub, in mod_pub_get()
1506 &pub, &status); in mod_pub_get()
1528 addr, mod_id, pub.addr, pub.app_idx, pub.cred_flag, pub.ttl, pub.period, in mod_pub_get()
1529 BT_MESH_PUB_TRANSMIT_COUNT(pub.transmit), in mod_pub_get()
1530 BT_MESH_PUB_TRANSMIT_INT(pub.transmit)); in mod_pub_get()
1538 struct bt_mesh_cfg_cli_mod_pub pub; in mod_pub_set() local
1546 pub.addr = shell_strtoul(argv[0], 0, &err); in mod_pub_set()
1547 pub.uuid = NULL; in mod_pub_set()
1551 pub.uuid = (const uint8_t *)&uuid; in mod_pub_set()
[all …]
/Zephyr-latest/samples/net/cloud/aws_iot_mqtt/src/
Dmain.c149 static ssize_t handle_published_message(const struct mqtt_publish_param *pub) in handle_published_message() argument
153 const size_t message_size = pub->message.payload.len; in handle_published_message()
157 (const char *)pub->message.topic.topic.utf8, pub->message_id, in handle_published_message()
158 pub->message.topic.qos, message_size, APP_BUFFER_SIZE); in handle_published_message()
176 switch (pub->message.topic.qos) { in handle_published_message()
180 puback.message_id = pub->message_id; in handle_published_message()
213 const struct mqtt_publish_param *pub = &evt->param.publish; in mqtt_event_cb() local
215 handle_published_message(pub); in mqtt_event_cb()
/Zephyr-latest/subsys/shell/backends/
Dshell_mqtt.c566 const struct mqtt_publish_param *pub = &evt->param.publish; in mqtt_evt_handler() local
571 payload_left = pub->message.payload.len; in mqtt_evt_handler()
574 LOG_DBG(" id: %d, qos: %d", pub->message_id, pub->message.topic.qos); in mqtt_evt_handler()
575 LOG_DBG(" item: %s", pub->message.topic.topic.utf8); in mqtt_evt_handler()
578 if (pub->message.topic.qos == MQTT_QOS_1_AT_LEAST_ONCE) { in mqtt_evt_handler()
579 struct mqtt_puback_param puback = { .message_id = pub->message_id }; in mqtt_evt_handler()

12