Skip to content
Nico Weichbrodt edited this page Feb 20, 2018 · 6 revisions

Types

enable_condition_t

Some functions have an optional argument of type enable_condition_t, normally called cond. This argument can point to a function with signature bool (*)() to control if

  • the callback shall be enabled.
  • the config option shall be enabled.
  • the feedback value shell be shown.

Essentially, everytime the web UI is rendered, the library checks if a enable condition function has been set and, if true, calls the function. If the function returns true, the callback/config option/feedback is shown. If it returns false, it is hidden. In the case of callbacks, the condition is also checked when receiving a KNX telegram and, if disabled, will not call the callback.

Clone this wiki locally