Echelon Neuron C User Manual
Page 201
Neuron C Reference Guide
181
ext-name
:
external_name (
C-string-const
)
external_resource_name (
C-string-const
)
external_resource_name (
const-expr
:
const-expr
)
fblock-body
:
[
fblock-member-list
] [
director-function
]
fblock-member-list
:
fblock-member-list
fblock-member
;
fblock-member
;
fblock-member
:
nv-reference
implements
member-name
nv-reference impl-specific
impl-specific
:
implementation_specific (
const-expr
)
member-name
nv-reference
:
nv-identifier
array-index
nv-identifier
array-index
:
[
const-expr
]
director-function
:
director
identifier
;
Example:
// Prototype for director function
extern void MyDirector (unsigned uFbIdx, int nCmd);
// Network variables referenced by this fblock:
network output SNVT_lev_percent nvoValue;
network input SNVT_count nviCount;
// The functional block itself ...
fblock SFPTanalogInput {
nvoValue implements nvoAnalog;
nviCount implementation_specific(128) nviCount;
director
myDirector;
} MyAnalogInput external_name("AnalogInput");
The functional block declaration begins with the fblock keyword, followed by the
name of a functional profile from a resource file. The functional block is an
implementation of the functional profile. The functional profile defines the
network variable and configuration property members, a unique key called the
functional profile number
(also called the
functional profile key)
, and other
information. The network variable and configuration property members are
divided into mandatory members and optional members. Mandatory members
must be implemented, and optional members need not be implemented.
The functional block declaration then proceeds with a member list. In this
member list, network variables are associated with the abstract network variable
members of the profile. These network variables must have previously been
declared in the program. The association between the members of the functional
block declaration and the profile’s abstract network variable members is
performed with the implements keyword. At a minimum, every
mandatory
profile network variable member must be implemented by an actual network
variable in the Neuron C program. Each network variable (or, in the case of a
network variable array, each array element) can implement no more than one
profile member, and can be associated with at most one functional block.
If allowed by the profile, you can have an empty member list. Such a functional
block is useful as a collection of related configuration properties.