beautypg.com

Declaring functional blocks – Echelon i.LON SmartServer 2.0 User Manual

Page 72

background image

58

Creating FPM Device Interface (XIF) Files

The type property corresponds to the standard or user-defined network variable type (SCPT
or UCPT) used by the configuration property. The specified data type must match the one
defined for the referenced configuration property in the UFPT.

The config_prop or cp keyword declares the data type as a configuration property.

The identifier property is a reference to the configuration property in the UFPT. The name
specified in this property is the one that will be used by network tools such as the SmartServer
and the LonMaker tool for the referenced configuration property. The maximum length of the
identifier is 16 characters.

EXAMPLES

The follow examples demonstrate how to create configuration properties in your model file:

network input SCPTmaxSendTime cp nciHeartbeat;

network input SCPTmaxRcvTime cp nciOffline;

network input SCPTminSendTime cp nciThrottle;
network input UCPTHysteresis cp nciHysteresis;

By convention, configuration property names have an nci prefix.

For more information on declaring configuration properties, see Chapter 4 of the Neuron C
Programmer’s Guide
.

Declaring Functional Blocks

A functional block is a collection of network variables and configuration properties that are used
together to perform one task. These network variables and configuration properties are called the
functional block members. Each functional block implements an instance of a functional profile.

A functional profile is used to describe common units of functional behavior. Each functional profile
defines mandatory and optional network variables and configuration properties. A functional block
must implement all of the mandatory network variables and configuration properties defined by the
functional profile, and it may implement any or all of the optional network variables and configuration
properties defined by the functional profile.

SYNTAX

You can use the following syntax to declare functional blocks.

fblock FPT-identifier {fblock-member-list} identifier
[external name] [{fb-property-list}];

The fblock keyword declares a functional block for the FPT-identifier and identifier
properties.

The FPT-identifier property specifies the name of the UPFT implemented by the functional
block.

The fblock-member-list property lists each network variable reference declared in the model
file. Every mandatory network variable member in a UFPT must be implemented by network
variable reference in the model file. Each network variable in the model file can implement
only network variable member, and can only be associated with one functional block in the
model file. You can list a network variable reference and implement its corresponding
network variable member in the UFPT using the following syntax:

nv-reference implements nv-member-name

The identifier property is the name the declared functional block. This name is not exposed
to the SmartServer so you can enter any string in this property.

The external_name keyword declares a functional block name that is exposed to the
SmartServer. You can specify the external name keyword and then a descriptive, readable
name for the functional block. If you do not specify a functional block name with