Home
last modified time | relevance | path

Searched full:pub (Results 1 – 25 of 67) sorted by relevance

123

/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/samples/subsys/zbus/uart_bridge/
DREADME.rst81 PUB [sensor_data] -> b'\xc5\x01\x00\x00\xb2\x11\x00\x00'
82 PUB [start_measurement] -> b'\x00'
83 PUB [sensor_data] -> b'\xc6\x01\x00\x00\xbc\x11\x00\x00'
84 PUB [start_measurement] -> b'\x01'
85 PUB [sensor_data] -> b'\xc7\x01\x00\x00\xc6\x11\x00\x00'
86 PUB [start_measurement] -> b'\x00'
87 PUB [sensor_data] -> b'\xc8\x01\x00\x00\xd0\x11\x00\x00'
88 PUB [start_measurement] -> b'\x01'
89 PUB [sensor_data] -> b'\xc9\x01\x00\x00\xda\x11\x00\x00'
90 PUB [start_measurement] -> b'\x00'
[all …]
Ddecoder.py45 print(f"PUB [{channel_name}] -> {msg}")
/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()
766 LOG_WRN("Mod Pub Model ID or Company ID mismatch"); 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/samples/subsys/zbus/remote_mock/
DREADME.rst76 Proxy PUB [start_measurement] -> start measurement
78 Proxy PUB [start_measurement] -> start measurement
80 Proxy PUB [start_measurement] -> start measurement
82 Proxy PUB [start_measurement] -> start measurement
84 Proxy PUB [start_measurement] -> start measurement
86 Proxy PUB [start_measurement] -> start measurement
88 Proxy PUB [start_measurement] -> start measurement
90 Proxy PUB [start_measurement] -> start measurement
92 Proxy PUB [start_measurement] -> start measurement
94 Proxy PUB [start_measurement] -> start measurement
/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()
179 LOG_ERR("Can't create PUB: no free slot"); in mqtt_sn_publish_create()
183 memset(pub, 0, sizeof(*pub)); in mqtt_sn_publish_create()
[all …]
/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()
290 FAIL("Mod pub set failed (err %d, status %u)", err, status); in dut_pub_common()
295 ASSERT_OK_MSG(k_sem_take(&publish_sem, K_SECONDS(30)), "Pub timed out"); in dut_pub_common()
316 ASSERT_OK_MSG(k_sem_take(&publish_sem, K_SECONDS(30)), "Pub timed out"); in dut_pub_common()
475 "Suspend and resume Mesh with periodic pub"),
477 "Suspend and resume Mesh (and disable/enable BT) with periodic pub"),
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()
517 FAIL("Mod pub set failed (err %d, status %u)", err, status); in pub_param_set()
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()
[all …]
/Zephyr-latest/tests/crypto/tinycrypt/src/
Dtest_ecc_utils.c165 unsigned int pub[2 * NUM_ECC_WORDS]; in keygen_vectors() local
181 * Internal mod-reduction will be zero-op and generate correct prv/pub in keygen_vectors()
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_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()
/Zephyr-latest/samples/subsys/zbus/hello_world/
Dsample.yaml27 - "I: Pub a valid value to a channel with validator successfully."
28 - "I: Pub an invalid value to a channel with validator successfully."
/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/include/zephyr/bluetooth/mesh/
Dmsg.h149 * @param pub Pointer to a model publication context.
151 #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, \
Dsar_cfg_cli.h33 struct bt_mesh_model_pub pub; member
50 _bt_mesh_sar_cfg_cli_op, _cli.pub, _cli, \
Dheartbeat.h110 * @param pub Current Heartbeat publication parameters.
112 void (*pub_sent)(const struct bt_mesh_hb_pub *pub);
Dcfg_cli.h51 /** @brief Optional callback for Model Pub status messages.
53 * Handles received Model Pub status messages from a server.
61 * @param pub Publication configuration parameters.
65 struct bt_mesh_cfg_cli_mod_pub *pub);
307 /** @brief Optional callback for Heartbeat pub status messages.
309 * Handles received Heartbeat pub status messages from a server.
314 * @param pub HB publication configuration parameters.
317 struct bt_mesh_cfg_cli_hb_pub *pub);
1013 * @p pub as NULL. This way the method will not wait for response
1020 * @param pub Publication parameter return buffer.
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/
DREADME.rst95 pub-set 0100 c000 1 0 5 1001
96 pub-set 0100 c000 1 0 5 1003

123