Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In addition to several LUA functions, the NXA LUA library also provides several event callbacks that are invoked by the server at specific points in time. Within these callbacks, the user can integrate LUA scripts that are execute whenever the server invokes the corresponding callback. Using this way, control functionality can be implemented
that shall be available for dedicated points in time.
<file name="OnInitEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnInitEvent () <p>This callback is invoked the during initialization of the server.
Within this callback, initialization task (e.g. creating Custom Items) can be performed.</p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnStartEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnStartEvent () <p>This callback is invoked during server start up. Since "OnStartEvent" is called after "OnInitEvent", all items are already available and can be accessed through LUA scripts.</p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnStopEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnStopEvent () <p>This callback is invoked during the shutdown process of the server.</p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnSecondTimerEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnSecondTimerEvent () <p>This callback is invoked every second. It can be used to implement functionality that has to be triggered every second.</p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnMinuteTimerEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnMinuteTimerEvent () <p>This callback is invoked every minute. It can be used to implement functionality that has to be triggered every minute. </p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnHourTimerEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnHourTimerEvent () <p>This callback is invoked every hour. It can be used to implement functionality that has to be triggered every hour. </p>
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="OnKNXGatewayConnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnKNXGatewayConnectedEvent (string) <p>This callback is invoked every time a KNX gateway has been connected. The parameter can be used to determine the connected gateway.</p> <h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th>
<th>Description</th>
</tr>
<tr><td></td><td>string</td><td>M</td><td>IP address of the KNX gateway</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="OnKNXGatewayDisconnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnKNXGatewayDisconnectedEvent (string) <p>This callback is invoked every time a KNX gateway has been disconnected. The parameter can be used to determine the disconnected gateway.</p> <h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th> <th>Description</th>
</tr>
<tr><td></td><td>string</td><td>M</td><td>IP address of the KNX gateway</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="OnClientConnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnClientConnectedEvent (clientType, clientName, source, IPAddress, user, (projectName)) <p>This function is invoked when a client is connected to the NETx BMS Core Server.
</p>
<h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th>
<th>Description</th>
</tr>
<tr><td></td><td>clientType</td><td>M</td><td>client type (WEB, VNET, or OPC)</td></tr>
<tr><td></td><td>clientName</td><td>M</td><td>client name</td></tr>
<tr><td></td><td>source</td><td>M</td><td>client source (e.g. Voyager.5.0, OPC Client name or IP address of BMS Client)</td></tr>
<tr><td></td><td>IPAddress</td><td>M</td><td>ip address of client</td></tr>
<tr><td></td><td>user</td><td>M</td><td>user that is currently online</td></tr> <tr><td></td><td>(projectName)</td><td>M</td><td>optional name of the visualization project</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="OnClientDisconnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
OnClientDisconnectedEvent (clientType, clientName, source, IPAddress, user) <p>This function is invoked when a client is disconnected from the NETx BMS Core Server.</p>
<h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th> <th>Description</th>
</tr>
<tr><td></td><td>clientType</td><td>M</td><td>client type (WEB, VNET, or OPC)</td></tr>
<tr><td></td><td>clientName</td><td>M</td><td>client name</td></tr>
<tr><td></td><td>source</td><td>M</td><td>client source (e.g. Voyager.5.0, OPC Client name or IP address of BMS Client)</td></tr>
<tr><td></td><td>IPAddress</td><td>M</td><td>ip address of client</td></tr>
<tr><td></td><td>user</td><td>M</td><td>user that is currently online</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="<connection_handle>_OnConnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
<connection_handle>_OnConnectedEvent () <p>This function is invoked when an XCON connection has been established. Create a function for each connection to monitor and name it accordingly, e.g. for connection socket1 create the function socket1_OnConnectedEv
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="<connection_handle>_OnDisconnectedEvent">
<h1>Description</h1>
<h1>Signature</h1>
<connection_handle>_OnDisconnectedEvent () <p>This function is invoked when an XCON connection has been established. Create a function for each connection to monitor and name it accordingly, e.g. for connection socket1 create the function socket1_OnDisconnecte
<h1>Parameters</h1> None.
<h1>Return</h1> None.
</file>
<file name="<connection_handle>_OnDoneEvent">
<h1>Description</h1>
<h1>Signature</h1>
<connection_handle>_OnDoneEvent (string, string) <p>This function is invoked when an FTP connection completed a transfer. Create a function for each connection to monitor and name it accordingly, e.g. for connection ftp1 create the function ftp1_OnDoneEvent
<h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th> <th>Description</th>
</tr>
<tr><td></td><td>string</td><td>M</td><td>source file name</td></tr>
<tr><td></td><td>string</td><td>M</td><td>destination file name</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="<connection_handle>_OnReceiveEvent">
<h1>Description</h1>
<h1>Signature</h1>
<connection_handle>_OnReceiveEvent (string, number, string, number) <p>This function is invoked when an XCON connection received data. Create a function for each connection to monitor and name it accordingly, e.g. for connection socket1 create the function socket1_OnReceiveEvent.</p> <h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th>
<th>Description</th>
</tr>
<tr><td></td><td>string</td><td>M</td><td>data string</td></tr>
<tr><td></td><td>number</td><td>M</td><td>data size</td></tr>
<tr><td></td><td>string</td><td>M</td><td>IP address of sender</td></tr>
<tr><td></td><td>number</td><td>M</td><td>port number of sender</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>
<file name="<connection_handle>_OnErrorEvent">
<h1>Description</h1>
<h1>Signature</h1>
<connection_handle>_OnErrorEvent (string) <p>This function is invoked when an error occurs on an XCON connection. Create a function for each connection to monitor and name it accordingly, e.g. for connection ftp1 create the function ftp1_OnErrorEvent.</p>
<h1>Parameters</h1>
<table>
<colgroup> <col/> <col/> <col/> <col/> </colgroup>
<tbody>
<tr>
<th>Name</th>
<th>Type</th>
<th>Mandatory/Optional</th> <th>Description</th>
</tr>
<tr><td></td><td>string</td><td>M</td><td>error message</td></tr>
</tbody>
</table>
<h1>Return</h1> None.
</file>

  • No labels