Functional block property lists – Echelon Neuron C User Manual

Page 119

Advertising
background image

Neuron C Programmer’s Guide

107

to provide language-dependent names for your functional blocks. The external

name is discussed in more detail in the

Neuron C Reference Guide

.

Example:

#define NUM_AMMETERS 4

network output SNVT_amp nvoAmpere[NUM_AMMETERS];

fblock SFPTopenLoopSensor {

nvoAmpere[0] implements nvoValue;

} fbAmpereMeter[NUM_AMMETERS] external_name("AmpereMeter");

Functional Block Property Lists

At the end of the functional block declaration is a property list, similar to the

device property lists and the network variable property lists discussed in the

previous chapter. The functional block’s property list, at a minimum, must
include all of the mandatory properties defined by the functional profile that

apply to the functional block. You may add implementation-specific properties to

the list without any special keywords. You cannot implement more than one
property of any particular SCPT or UCPT type for the same functional block.
The functional block’s property list must only contain the mandatory and
optional properties that apply to the functional block as a whole. Properties that

apply specifically to an individual abstract network variable member of the

profile must appear in the

nv-property-list

of the network variable that

implements the member, rather than in the

fb-property-list

.

See the

Neuron C Reference Guide

for a description of the syntax for the

functional block’s property list.

Example:

SCPTdefOutput cp_family

cpDefaultOutput;

SCPTbrightness cp_family cpDisplayBrightness;

network output SNVT_amp nvoAmpere;
network output polled SNVT_time_stamp nvoInstallDate;

fblock SFPTopenLoopSensor {

nvoAmpere implements nvoValue;

} fbAmpereMeter external_name("AmpereMeter")
fb_properties

{

cpDefaultOutput,

//

optional

CP

cpDisplayBrightness

//

implementation-spec.

};

The example implements an open-loop sensor as an ampere meter. The nvoValue
mandatory network variable is implemented, but no optional network variables

are. The SCPTdefOutput optional configuration property is also implemented.

The names in the above example for the CP families (cpDefaultOutput and

cpDisplayBrightness) have no external relevance; these names are only used

within the device’s source code to reference the configuration property. See

Accessing Members and Properties of a Functional Block from a Program

on page

110 and

Accessing Members and Properties of a Functional Block from a Network

Tool

on page 112 for more details.

Advertising