beautypg.com

Handling local network management tasks, Handling reset events, Querying the error log – Echelon FTXL User Manual

Page 107: Working with ecs devices

background image

FTXL User’s Guide

95

management callbacks. These commands are requests for your application to

wink, go offline, go online, or reset, and are handled by your LonWink(),
LonOffline(), LonOnline(), and LonReset() callback handler functions.

Handling Local Network Management Tasks

There are various network management tasks that a device can choose to initiate

on its own. These are local network management tasks, which are initiated by
the FTXL application and implemented by the FTXL LonTalk protocol stack.

Local network management commands are never propagated to the network.

The FTXL Extended LonTalk APIs allow you to include handling of these local
network management commands if your FTXL application requires it.

Handling Reset Events

A network management tool can send a reset message to the FTXL device for a
variety of reasons. For example, to reset the device after changing the

communication parameters (including setting the priority), or following an

update to a configuration property that is declared with a restriction flag which
indicates that the network manager must reset the device after an update. The

FTXL LonTalk protocol stack processes reset messages and manages everything

that is required by the protocol. It also calls the LonReset() event handler
function to inform the application, so that the application can perform any

application specific processing.
The LonReset() callback handler function returns a pointer to the
LonResetNotification structure, but this pointer is always NULL. The pointer is

included for code compatibility with ShortStack applications. Whenever the

FTXL device is reset, the state of the device is set to configured, and the mode of
the device is changed to online, but no LonOnline() event is generated.
Resetting an FTXL device from the network affects only the FTXL stack, and
does not cause a processor or application software reset.

Querying the Error Log

The FTXL LonTalk protocol stack writes application errors to the system error

log. The LonStatus structure, which is returned by the LonQueryStatus()
function contains complete statistics information, such as the number of transmit

errors, transaction timeouts, missed and lost messages, and so on.

Working with ECS Devices

An FTXL device is an extended command set (ECS) device (that is, the
ver_nm_max field of the Capability Info Record in the device’s self-identification

string is greater than 0). An FTXL device supports both the extended command

set and legacy network management commands. However, after the device
receives any extended commands, it operates in the extended mode, and returns

a negative response to legacy commands.
Any LNS-based tool communicates with an FTXL device using ECS commands
(for example, during device commissioning), and thus places the device in

extended mode. Some tools that are not based on LNS, such as the NodeUtil