Lontalk stack callback handler functions, Commonly used callback handler functions – Echelon LonTal Stack User Manual
Page 199
LonTalk Stack Developer’s Guide
187
Function
Description
LonNvdStarvation() Indicates that a write request to non-volatile data has taken more
than 60 seconds.
The application should call the LonNvdFlushData() API function
to ensure that non-volatile data is written.
LonTalk Stack Callback Handler Functions
In addition to providing event handler functions, the LonTalk API also provides
callback handler functions, mainly for managing memory on the LonTalk Stack
device.
Commonly Used Callback Handler
Functions
In addition to processing events, the LonTalk API provides the callback handler
functions listed in the following table.
Function
Description
LonGetCurrentNvSize()
Indicates a request for the network variable size.
The LonTalk Host stack calls this callback handler
function to determine the current size of a
changeable-type network variable.
For non-changeable-type network variables, this
function should return the value of the
LonGetDeclaredNvSize() function. For
changeable-type network variables, you must modify
this function in the FtxlHandlers.c file.
LonEventReady()
Indicates that a network event is ready to be processed.
The LonTalk Host stack calls this callback handler
function to indicate that a network event is ready to be
processed, and that the main application should call the
LonEventPump() function. However, the
LonEventReady() function should not call the
LonEventPump() function directly. Typically, the
LonEventReady() callback signals an operating
system event that the main application task waits upon.
When the main application task wakes up, it should call
the LonEventPump() function.
LonGetMyIpAddress()
Gets the IP address and port number of an IP-852
interface. This method has the following syntax:
void LonGetMyIpAddress(int *pAddress, int *pPort);