Lines Matching refs:sub
58 static void sub_hb_recv_cb(const struct bt_mesh_hb_sub *sub, uint8_t hops, uint16_t feat) in sub_hb_recv_cb() argument
60 LOG_INF("Heartbeat received from addr: 0x%04x", sub->src); in sub_hb_recv_cb()
62 ASSERT_EQUAL(PUBLISHER_ADDR_START, sub->src); in sub_hb_recv_cb()
63 ASSERT_EQUAL(pub_addr, sub->dst); in sub_hb_recv_cb()
64 ASSERT_EQUAL(SUBSCRIBE_PERIOD_SEC, sub->period); in sub_hb_recv_cb()
65 ASSERT_TRUE(sub->remaining <= SUBSCRIBE_PERIOD_SEC); in sub_hb_recv_cb()
66 ASSERT_EQUAL(sub_ctx.count + 1, sub->count); in sub_hb_recv_cb()
90 sub_ctx.min_hops = MIN(sub_ctx.min_hops, sub->min_hops); in sub_hb_recv_cb()
91 sub_ctx.max_hops = MAX(sub_ctx.max_hops, sub->max_hops); in sub_hb_recv_cb()
94 static void sub_hb_end_cb(const struct bt_mesh_hb_sub *sub) in sub_hb_end_cb() argument
97 ASSERT_EQUAL(PUBLISHER_ADDR_START, sub->src); in sub_hb_end_cb()
98 ASSERT_EQUAL(pub_addr, sub->dst); in sub_hb_end_cb()
99 ASSERT_EQUAL(SUBSCRIBE_PERIOD_SEC, sub->period); in sub_hb_end_cb()
100 ASSERT_EQUAL(0, sub->remaining); in sub_hb_end_cb()
101 ASSERT_EQUAL(PUBLISH_MSG_CNT, sub->count); in sub_hb_end_cb()
102 ASSERT_EQUAL(sub_ctx.count, sub->count); in sub_hb_end_cb()
103 ASSERT_EQUAL(sub_ctx.min_hops, sub->min_hops); in sub_hb_end_cb()
104 ASSERT_EQUAL(sub_ctx.max_hops, sub->max_hops); in sub_hb_end_cb()