Echelon FTXL User Manual

Page 80

Advertising
background image

68

Using the LonTalk Interface Developer Utility

#define LON_MSMANTISSA_FIELD Flags_2

See the IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std

754-1985) documentation for more information.

Network Variable and Configuration Property
Declarations

The LonTalk Interface Developer utility generates network variables and
configuration properties using the built-in types defined in LonPlatform.h along

with the types defined in LonNvTypes.h and LonCpTypes.h. Both network
variables and configuration properties are declared in the FtxlDev.c file, where

input network variables (including configuration network variables) appear as

volatile variables of the relevant type, and configuration properties that are not
implemented with network variables appear as members of configuration files.
Example:
A model file contains the following Neuron C declarations:

SCPTlocation cp_family cpLocation;


network input SNVT_obj_request nviNodeRequest;

network output polled SNVT_obj_status nvoNodeStatus;

const network output polled SNVT_address nvoFileDir;

fblock SFPTnodeObject {

nviNodeRequest implements nviRequest;

nvoNodeStatus

implements

nvoStatus;

nvoFileDir

implements nvoFileDirectory;

} NodeObject external_name("NodeObject") fb_properties {

cpLocation

};

The LonTalk Interface Developer utility generates the following variables in the

FtxlDev.c file for the nviNodeRequest, nvoNodeStatus, and nvoFileDir network
variables:

volatile SNVT_obj_request nviNodeRequest;

SNVT_obj_status nvoNodeStatus;

SNVT_address nvoFileDir = {

LON_DMF_WINDOW_START/256u, LON_DMF_WINDOW_START%256u

};

The FTXL LonTalk API, upon receipt of an incoming network variable update,
automatically moves data into the corresponding input network variable and

signals this event by calling an event handler function, which allows your

application to respond to the arrival of new network variable data. Your
application then reads the input variable to obtain the latest value.
To send an update to the nvoNodeStatus output network variable, your

application writes the new value to the nvoNodeStatus variable, and then calls
the LonPropagateNv() function to propagate the new value onto the network.
See

Developing an FTXL Application

on page 73 for information about the

development of a FTXL application using the LonTalk Interface Developer
utility-generated code.

Advertising