Skip to content

Commit

Permalink
topoh: documented event_callback parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jun 25, 2017
1 parent ca3f2fc commit 1b9e1f7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/modules/topoh/doc/topoh_admin.xml
Expand Up @@ -278,6 +278,36 @@ modparam("topoh", "sanity_checks", 1)
...
modparam("topoh", "uri_prefix_checks", 1)
...
</programlisting>
</example>
</section>
<section id="topoh.p.event_callback">
<title><varname>event_callback</varname> (str)</title>
<para>
The name of the function in the KEMI configuration file (embedded
scripting language such as Lua, Python, ...) to be executed instead
of event_route[...] blocks.
</para>
<para>
The function receives a string parameter with the name of the event.
</para>
<para>
<emphasis>
Default value is 'empty' (no function is executed for events).
</emphasis>
</para>
<example>
<title>Set <varname>event_callback</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("topoh", "event_callback", "ksr_topoh_event")
...
-- event callback function implemented in Lua
function ksr_topoh_event(evname)
KSR.info("===== topoh module triggered event: " .. evname .. "\n");
return 1;
end
...
</programlisting>
</example>
</section>
Expand Down

0 comments on commit 1b9e1f7

Please sign in to comment.