zunoAttachSysHandler()

Binds any Z-Uno event to specified callback function. It's a low level Z-Uno core API. In most cases user is able to use upper level functions are based on zunoAttachSysHandler. Follow to "see also" section for details. zunoAttachSysHandler(type, sub_type, handler)
type:
  • ZUNO_HANDLER_SYSTIMER
  • System timer event. It triggers every 10 millisecond.
  • ZUNO_HANDLER_SYSEVENT
  • Z-Uno system runtime events. Triggers when Z-Uno starts learn mode, OTA upgrade and etc...
  • ZUNO_HANDLER_IRQ
  • General interrupt handler. Triggers on any interrupt that is acceptable for user-side of code. sub_type in this case defines interrupt type.
  • ZUNO_HANDLER_SLEEP
  • Triggers just before Z-Uno goes to sleep.
  • ZUNO_HANDLER_WUP
  • Triggers every time Z-Uno wakes up from EM2 mode
  • ZUNO_HANDLER_ZW_CFG
  • Triggers every time user changes Configuration parameters
  • ZUNO_HANDLER_ZW_BATTERY
  • Triggers every time system calls for battery charge value.
  • ZUNO_HANDLER_REPORT
  • Triggers every time Z-Uno gets Z-Wave report (like BasicReport, SwitchBinaryReport and etc..)
  • ZUNO_HANDLER_EXTINT
  • Triggers every time Z-Uno gets external inetrrupt. It's a specific case of ZUNO_HANDLER_IRQ.
  • ZUNO_HANDLER_GPT
  • Triggers every time Z-Uno gets General Purpose Timer (GPT) inetrrupt. It's a specific case of ZUNO_HANDLER_IRQ.
  • ZUNO_HANDLER_NOTIFICATON_TIME_STAMP
  • Triggers every time Z-Uno is called for time paramer value.
sub_type: depends on `type` parameter. handler: Pointer to function which is binded to specified system event.
  • ZunoErrorOk - it's all right. Handler succesfuly attached.
  • ZunoErrorAttachSysHandler. The table is full. System couldn't attach one more handler.
Please note that it's not recommended to do heavy staff inside handlers. This can lead to degradation of the system.
High level proxy-functions that provide more comfortable interface.

attachInterrupt attaches interrupt handler to needed pin.


Static macros that bind handlers.

ZUNO_SETUP_BATTERY_HANDLER Setups battery level handler (Z-Wave command class Battery).

ZUNO_SETUP_SYSTIMER_HANDLER Setups system timer handler.

ZUNO_SETUP_SYSEVENT_HANDLER Setups system runtime events handler.

ZUNO_SETUP_ISR_GPTIMER Setups General Puspose Timer's interrupt handler.

ZUNO_REPORTS_HANDLER Setups incoming Z-Wave report handler.

ZUNO_SETUP_CFGPARAMETER_HANDLER Setups configuration parameters handler (Z-Wave command class Configuration).