Echelon LonTal Stack User Manual
Page 5
LonTalk Stack Developer’s Guide
v
Specifying Code Generator Preferences............................................... 91
Compiling and Generating the Files .................................................... 92
Using the LonTalk Interface Developer Files ............................................ 93
LonNvTypes.h and LonCpTypes.h ....................................................... 94
project.xif and project.xfb...................................................................... 95
Floating Point Variables ....................................................................... 98
Network Variable and Configuration Property Declarations ................. 100
Constant Configuration Properties........................................................... 102
The Network Variable Table ..................................................................... 103
Network Variable Attributes .............................................................. 103
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
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
The DMF Memory Window................................................................. 129
Shutting Down the LonTalk Stack device................................................ 131
Developing an IP-852 Router Application........................................133
Developing an IP-852 Router Application ................................................ 134