mesh: add mesh_model_publication_stop

This commit is contained in:
Matthias Ringwald 2019-07-01 18:20:02 +02:00
parent 947da55084
commit 3c33c940a7
2 changed files with 15 additions and 1 deletions

View File

@ -1315,6 +1315,14 @@ void mesh_model_publication_start(mesh_model_t * mesh_model){
mesh_model_publication_run(NULL); 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){ void mesh_access_state_changed(mesh_model_t * mesh_model){
mesh_publication_model_t * publication_model = mesh_model->publication_model; mesh_publication_model_t * publication_model = mesh_model->publication_model;
if (publication_model == NULL) return; if (publication_model == NULL) return;

View File

@ -311,11 +311,17 @@ uint8_t mesh_access_transactions_get_next_transaction_id(void);
void mesh_access_state_changed(mesh_model_t * mesh_model); void mesh_access_state_changed(mesh_model_t * mesh_model);
/** /**
* Start Model Publcation * Start Model Publication
* @param mesh_model * @param mesh_model
*/ */
void mesh_model_publication_start(mesh_model_t * 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 // Mesh PDU Getter
uint16_t mesh_pdu_src(mesh_pdu_t * pdu); uint16_t mesh_pdu_src(mesh_pdu_t * pdu);
uint16_t mesh_pdu_dst(mesh_pdu_t * pdu); uint16_t mesh_pdu_dst(mesh_pdu_t * pdu);