Echelon LonTal Stack User Manual

Page 5

Advertising
background image

LonTalk Stack Developer’s Guide

v

Specifying Code Generator Preferences............................................... 91

Compiling and Generating the Files .................................................... 92

Using the LonTalk Interface Developer Files ............................................ 93

Copied Files............................................................................................ 94

LonNvTypes.h and LonCpTypes.h ....................................................... 94

FtxlDev.h................................................................................................ 95

FtxlDev.c ................................................................................................ 95

project.xif and project.xfb...................................................................... 95

Using Types .................................................................................................. 95

Bit Field Members ................................................................................. 97

Enumerations ........................................................................................ 98

Floating Point Variables ....................................................................... 98

Network Variable and Configuration Property Declarations ................. 100

Constant Configuration Properties........................................................... 102

The Network Variable Table ..................................................................... 103

Network Variable Attributes .............................................................. 103

The Message Tag Table ............................................................................. 104

8

Developing a LonTalk Stack Device Application...........................105

Overview of a LonTalk Stack Device Application.................................... 106

Using the LonTalk API ....................................................................... 106

Callbacks and Events..........................................................................108

Integrating the Application with an Operating System ................... 108

Providing Persistent Storage for Non-Volatile Data......................... 109

Restoring Non-Volatile Data ........................................................ 110

Writing Non-Volatile Data ........................................................... 111

Tasks Performed by a LonTalk Stack Application .................................. 112

Initializing the LonTalk Stack Device ............................................... 113

Periodically Calling the Event Pump................................................. 113

Sending a Network Variable Update ................................................. 115

Receiving a Network Variable Update from the Network................ 117

Handling a Network Variable Poll Request from the Network........ 120

Handling Changes to Changeable-Type Network Variables............ 120

Validating a Type Change ............................................................ 121

Processing a Type Change............................................................ 122

Processing a Size Change ............................................................. 123

Rejecting a Type Change .............................................................. 124

Handling Dynamic Network Variables .............................................. 124

Communicating with Other Devices Using Application

Messages .............................................................................................. 125

Sending an Application Message to the Network ....................... 126

Receiving an Application Message from the Network................ 126

Handling Management Commands.................................................... 126

Handling Local Network Management Tasks ................................... 127

Handling Reset Events........................................................................127

Querying the Error Log.......................................................................127

Working with ECS Devices........................................................................ 127

Using Direct Memory Files........................................................................ 128

The DMF Memory Window................................................................. 129

File Directory ....................................................................................... 130

Shutting Down the LonTalk Stack device................................................ 131

9

Developing an IP-852 Router Application........................................133

Developing an IP-852 Router Application ................................................ 134

Advertising