/** **************************************************************************************** * @brief Disconnection indication to ANPC. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gap_discon_cmp_evt_handler(ke_msg_id_t const msgid, struct gap_discon_cmp_evt const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { // Get the address of the environment struct cscpc_env_tag *cscpc_env = PRF_CLIENT_GET_ENV(dest_id, cscpc); ASSERT_ERR(cscpc_env != NULL); // Free the stored operation if needed if (cscpc_env->operation != NULL) { // Check if we were waiting for a SC Control Point indication if (((struct cscpc_cmd *)cscpc_env->operation)->operation == CSCPC_CTNL_PT_CFG_IND_OP_CODE) { // Stop the procedure timeout timer ke_timer_clear(CSCPC_TIMEOUT_TIMER_IND, dest_id); } ke_msg_free(ke_param2msg(cscpc_env->operation)); cscpc_env->operation = NULL; } PRF_CLIENT_DISABLE_IND_SEND(cscpc_envs, dest_id, CSCPC); return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to BLPC. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gapc_disconnect_ind_handler(ke_msg_id_t const msgid, struct gapc_disconnect_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { PRF_CLIENT_DISABLE_IND_SEND(blpc_envs, dest_id, BLPC, param->conhdl); return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to HTPC. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gap_discon_cmp_evt_handler(ke_msg_id_t const msgid, struct gap_discon_cmp_evt const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { PRF_CLIENT_DISABLE_IND_SEND(htpc_envs, dest_id, HTPC); // Message is consumed return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to proximity monitor * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gapc_disconnect_ind_handler(ke_msg_id_t const msgid, struct gapc_disconnect_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { PRF_CLIENT_DISABLE_IND_SEND(proxm_envs, dest_id, PROXM, param->conhdl); // message is consumed return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to StreamData Host Profile * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gap_discon_cmp_evt_handler(ke_msg_id_t const msgid, struct gap_discon_cmp_evt const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { PRF_CLIENT_DISABLE_IND_SEND(streamdatah_envs, dest_id, STREAMDATAH); // message is consumed return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to GLPC. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gapc_disconnect_ind_handler(ke_msg_id_t const msgid, struct gapc_disconnect_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { PRF_CLIENT_DISABLE_IND_SEND(glpc_envs, dest_id, GLPC, param->conhdl); // Stop timer. ke_timer_clear(GLPC_RACP_REQ_TIMEOUT, dest_id); return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Handles reception of the @ref HOGPBH_DISABLE_REQ message. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int hogpbh_disable_req_handler(ke_msg_id_t const msgid, struct hogpbh_disable_req const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { // Get the address of the environment struct hogpbh_env_tag *hogpbh_env = PRF_CLIENT_GET_ENV(dest_id, hogpbh); // Counter uint8_t hids_nb; for (hids_nb = 0; hids_nb < hogpbh_env->hids_nb; hids_nb++) { // Unregister the profile in the GATT prf_unregister_atthdl2gatt(&hogpbh_env->con_info, &hogpbh_env->hids[hids_nb].svc); } PRF_CLIENT_DISABLE_IND_SEND(hogpbh_envs, dest_id, HOGPBH); // Message is consumed return (KE_MSG_CONSUMED); }
/** **************************************************************************************** * @brief Disconnection indication to ANPC. * @param[in] msgid Id of the message received. * @param[in] param Pointer to the parameters of the message. * @param[in] dest_id ID of the receiving task instance * @param[in] src_id ID of the sending task instance. * @return If the message was consumed or not. **************************************************************************************** */ static int gapc_disconnect_ind_handler(ke_msg_id_t const msgid, struct gapc_disconnect_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { // Get the address of the environment struct anpc_env_tag *anpc_env = PRF_CLIENT_GET_ENV(dest_id, anpc); ASSERT_ERR(anpc_env != NULL); // Free the stored operation if needed if (anpc_env->operation != NULL) { ke_msg_free(ke_param2msg(anpc_env->operation)); anpc_env->operation = NULL; } PRF_CLIENT_DISABLE_IND_SEND(anpc_envs, dest_id, ANPC, param->conhdl); return (KE_MSG_CONSUMED); }