# Enable/Disable notifications All notifications can be enabled or disabled. By default, all notifications are enabled except for: - EC_NOTIFY_SLAVE_STATECHANGED - EC_NOTIFY_SLAVES_STATECHANGED - EC_NOTIFY_SLAVES_PRESENCE - EC_NOTIFY_REFCLOCK_PRESENCE - EC_NOTIFY_SLAVES_UNEXPECTED_STATE - EC_NOTIFY_SLAVES_ERROR_STATUS - EC_NOTIFY_COE_INIT_CMD - EC_NOTIFY_SLAVE_REGISTER_TRANSFER ## emonIoCtl - EC_IOCTL_SET_NOTIFICATION_ENABLED ### EC_IOCTL_SET_NOTIFICATION_ENABLED Set notification enabled state. With [EC_T_SET_NOTIFICATION_ENABLED_PARMS::dwCode](#d6/ddc/struct_e_c___t___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d___p_a_r_m_s_1ae1b2f429de202edb4e017449955a8800) set to [EC_ALL_NOTIFICATIONS](#de/dee/group___e_c___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d_1ga5c0e488c77506c184264fac70db448ee), all notifications can be changed at once. [EC_T_SET_NOTIFICATION_ENABLED_PARMS::dwEnabled](#d6/ddc/struct_e_c___t___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d___p_a_r_m_s_1a322df8c32453561c2be96821b3d3e1db) set to [EC_NOTIFICATION_DEFAULT](#de/dee/group___e_c___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d_1gafc3e9d34942a7587b73530566e3edd06), resets to default. * **Parameters:** * **pbyInBuf** – [in] Pointer to [EC_T_SET_NOTIFICATION_ENABLED_PARMS](#d6/ddc/struct_e_c___t___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d___p_a_r_m_s). * **dwInBufSize** – [in] Size of the input buffer provided at pbyInBuf in bytes * **pbyOutBuf** – [out] Should be set to EC_NULL * **dwOutBufSize** – [in] Should be set to 0 * **pdwNumOutData** – [out] Should be set to EC_NULL * **Returns:** [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) or error code ### struct EC_T_SET_NOTIFICATION_ENABLED_PARMS ### Public Members ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwClientId [in] Client ID, 0: Master ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwCode [in] Notification code or [EC_ALL_NOTIFICATIONS](#de/dee/group___e_c___s_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d_1ga5c0e488c77506c184264fac70db448ee) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwEnabled [in] Enable, disable or reset to default notification. See [EC_NOTIFICATION_](#de-dee-group-e-c-s-e-t-n-o-t-i-f-i-c-a-t-i-o-n-e-n-a-b-l-e-d) flags. ### EC_NOTIFICATION_DISABLED Disable notification ### EC_NOTIFICATION_ENABLED Enable notification ### EC_NOTIFICATION_DEFAULT Reset notification to default ### EC_ALL_NOTIFICATIONS Notification code to change all notifications #### SEE ALSO [`emonIoCtl()`](api_general.html.md#_CPPv49emonIoCtl10EC_T_DWORD10EC_T_DWORDPCK9EC_T_VOID10EC_T_DWORDPC9EC_T_VOID10EC_T_DWORDPC10EC_T_DWORD) ## emonIoCtl - EC_IOCTL_GET_NOTIFICATION_ENABLED ### EC_IOCTL_GET_NOTIFICATION_ENABLED The enabled state of notifications can be retrieved using [EC_IOCTL_GET_NOTIFICATION_ENABLED](#d0/d35/_ec_io_ctl_8h_1a925565a04161b26d801353adb08054dd). * **Parameters:** * **pbyInBuf** – [in] Pointer to [EC_T_GET_NOTIFICATION_ENABLED_PARMS](#dc/d03/struct_e_c___t___g_e_t___n_o_t_i_f_i_c_a_t_i_o_n___e_n_a_b_l_e_d___p_a_r_m_s) * **dwInBufSize** – [in] Size of the input buffer provided at pbyInBuf in bytes * **pbyOutBuf** – [out] Pointer to EC_T_BOOL to carry out current enable set * **dwOutBufSize** – [in] Size of the output buffer provided at pbyOutBuf in bytes * **pdwNumOutData** – [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer * **Returns:** [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) or error code ### struct EC_T_GET_NOTIFICATION_ENABLED_PARMS ### Public Members ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwClientId [in] Client ID, 0: Master ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwCode [in] Notification code #### SEE ALSO [`emonIoCtl()`](api_general.html.md#_CPPv49emonIoCtl10EC_T_DWORD10EC_T_DWORDPCK9EC_T_VOID10EC_T_DWORDPC9EC_T_VOID10EC_T_DWORDPC10EC_T_DWORD)