Commonly used lontalk api functions, Other lontalk api functions – Echelon LonTal Stack User Manual

Page 193

Advertising
background image

LonTalk Stack Developer’s Guide

181

Commonly Used LonTalk API Functions

The following table lists API functions that you will most likely use in your

LonTalk Stack application.

Function

Description

LonEventPump()

Processes any messages received by the LonTalk host stack. If
messages are received, it calls the appropriate event handler

functions.
See Periodically Calling the Event Pump for more information
about this function.

LonExit()

Stops the LonTalk host stack for an orderly shutdown of the

LonTalk Stack device.

LonInit()

Initializes the LonTalk API and the LonTalk host stack. This

function downloads LonTalk Stack device interface data from the

LonTalk Stack application to the Echelon Smart Transceiver or
Neuron Chip.
The LonTalk Stack application must call LonInit() once on
startup.

LonPropagateNv()

Propagates a network variable value to the network.

This function propagates a network variable if all of the following

conditions are met:

• The network variable is declared with the output modifier
• The network variable must be bound to the network
• The network variable must not be declared with the

polled modifier.

Other LonTalk API Functions

The following table lists other LonTalk API functions that you can use in your

LonTalk Stack application. These functions are not typically used by most
LonTalk Stack applications, or are used only for specific application functionality

(for example, including support for changeable-type network variables).

Function

Description

LonFreeNvTypeData()

Frees internal buffers that were allocated by a call to the
LonQueryNvType() function.

LonGetDeclaredNvSize() Gets the declared size for a network variable.

LonGetNvValue()

Gets a pointer to the value for a network variable. This

function is required for dynamic network variables, but could
be used for any network variable.

Advertising