Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Description

Signature

OnInitEvent ()

This callback is invoked the during initialization of the server. Within this callback, initialization task (e.g. creating Custom Items) can be performed.

Parameters

None.

Return

None.

Description

Signature

OnStartEvent ()

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.

Parameters

None.

Return

None.

Description

Signature

OnStopEvent ()

This callback is invoked during the shutdown process of the server.

Parameters

None.

Return

None.

Description

Signature

OnSecondTimerEvent ()

This callback is invoked every second. It can be used to implement functionality that has to be triggered every second.

Parameters

None.

Return

None.

Description

Signature

OnMinuteTimerEvent ()

This callback is invoked every minute. It can be used to implement functionality that has to be triggered every minute.

Parameters

None.

Return

None.

Description

Signature

OnHourTimerEvent ()

This callback is invoked every hour. It can be used to implement functionality that has to be triggered every hour.

Parameters

None.

Return

None.

Description

Signature

OnKNXGatewayConnectedEvent (string)

This callback is invoked every time a KNX gateway has been connected. The parameter can be used to determine the connected gateway.

Parameters

...

Return

None.

Description

Signature

OnKNXGatewayDisconnectedEvent (string)

This callback is invoked every time a KNX gateway has been disconnected. The parameter can be used to determine the disconnected gateway.

Parameters

...

Return

None.

Description

Signature

OnClientConnectedEvent (clientType, clientName, source, IPAddress, user, (projectName))

This function is invoked when a client is connected to the NETx BMS Core Server.

Parameters

...

Return

None.

Description

Signature

OnClientDisconnectedEvent (clientType, clientName, source, IPAddress, user)

This function is invoked when a client is disconnected from the NETx BMS Core Server.

Parameters

...

Return

None.

Description

Signature

OnConnectedEvent ()

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

Parameters

None.

Return

None.

Description

Signature

OnDisconnectedEvent ()

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

Parameters

None.

Return

None.

Description

Signature

OnDoneEvent (string, string)

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

Parameters

...

Return

None.

Description

Signature

OnReceiveEvent (string, number, string, number)

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.

Parameters

...

Return

None.

Description

Signature

OnErrorEvent (string)

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.

Parameters

...

Return

None.