diff --git a/test/mesh/mesh_access.c b/test/mesh/mesh_access.c index 336b83c6c..b50f6f6da 100644 --- a/test/mesh/mesh_access.c +++ b/test/mesh/mesh_access.c @@ -1315,6 +1315,14 @@ void mesh_model_publication_start(mesh_model_t * mesh_model){ mesh_model_publication_run(NULL); } +void mesh_model_publication_stop(mesh_model_t * mesh_model){ + mesh_publication_model_t * publication_model = mesh_model->publication_model; + if (publication_model == NULL) return; + + // reset state + publication_model->state = MESH_MODEL_PUBLICATION_STATE_IDLE; +} + void mesh_access_state_changed(mesh_model_t * mesh_model){ mesh_publication_model_t * publication_model = mesh_model->publication_model; if (publication_model == NULL) return; diff --git a/test/mesh/mesh_access.h b/test/mesh/mesh_access.h index 09bfe3338..45a01dda5 100644 --- a/test/mesh/mesh_access.h +++ b/test/mesh/mesh_access.h @@ -311,11 +311,17 @@ uint8_t mesh_access_transactions_get_next_transaction_id(void); void mesh_access_state_changed(mesh_model_t * mesh_model); /** - * Start Model Publcation + * Start Model Publication * @param mesh_model */ void mesh_model_publication_start(mesh_model_t * mesh_model); +/** + * Stop Model Publication + * @param mesh_model + */ +void mesh_model_publication_stop(mesh_model_t * mesh_model); + // Mesh PDU Getter uint16_t mesh_pdu_src(mesh_pdu_t * pdu); uint16_t mesh_pdu_dst(mesh_pdu_t * pdu);