10.3. 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

10.3.1. emonIoCtl - EC_IOCTL_SET_NOTIFICATION_ENABLED

EC_IOCTL_SET_NOTIFICATION_ENABLED

Set notification enabled state. With EC_T_SET_NOTIFICATION_ENABLED_PARMS::dwCode set to EC_ALL_NOTIFICATIONS, all notifications can be changed at once. EC_T_SET_NOTIFICATION_ENABLED_PARMS::dwEnabled set to EC_NOTIFICATION_DEFAULT, resets to default.

Parameters:
  • pbyInBuf – [in] Pointer to EC_T_SET_NOTIFICATION_ENABLED_PARMS.

  • 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 or error code

struct EC_T_SET_NOTIFICATION_ENABLED_PARMS

Public Members

EC_T_DWORD dwClientId

[in] Client ID, 0: Master

EC_T_DWORD dwCode

[in] Notification code or EC_ALL_NOTIFICATIONS

EC_T_DWORD dwEnabled

[in] Enable, disable or reset to default notification. See EC_NOTIFICATION_ 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()

10.3.2. 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.

Parameters:
  • pbyInBuf – [in] Pointer to EC_T_GET_NOTIFICATION_ENABLED_PARMS

  • 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 or error code

struct EC_T_GET_NOTIFICATION_ENABLED_PARMS

Public Members

EC_T_DWORD dwClientId

[in] Client ID, 0: Master

EC_T_DWORD dwCode

[in] Notification code

See also

emonIoCtl()