Assembly number allocation, Supporting compound assembly connections – Echelon ISI User Manual

Page 69

Advertising
background image

67

ISI Programmer’s Guide

Library Functions with Forwarders

Forwarders are implemented in a way that eliminates any overhead for the

indirection; there is no benefit in calling the sister function directly other than
from within an overridden function.

Forwarders are often used to provide an application-specific implementation in a
certain aspect, and to fall back to standard behavior in all other cases. For

example, consider this override of the IsiGetWidth() function:


unsigned IsiGetWidth(unsigned Assembly) {
return Assembly == SPECIAL ? 3 : isiGetWidth(Assembly);
}

The overridden function provides a width of 3 for a single, special, assembly, and

returns the standard width for all other assemblies.

Assembly Number Allocation

Assembly numbers must be in the 0 – 254 range and sequentially assigned by the
device application starting at 0. Required assemblies for standard profiles must

be first, assigned in the order the profiles are declared in the application.
Standard ISI profiles that define multiple assemblies must specify the order the

assemblies are to be assigned.

Many of the default ISI functions use a default assembly numbering scheme

where the assembly number is equal to the associated network variable’s index.
For assemblies containing multiple network variables, the lowest index of all

associated network variables is used.

The following ISI functions use the default assembly numbering scheme. These

functions are forwardees. If you create a custom assembly number scheme, you
must override all of the related forwarders to use your scheme, and may no

longer use these forwardees:

• isiGetNvIndex()

• isiGetNextNvIndex()

• isiCreateCsmo()

• isiGetAssembly()

• isiGetNextAssembly()

Supporting Compound Assembly Connections

You can support connections of compound assemblies with multiple network

variables, either in a single functional block or multiple functional blocks, or
without any functional blocks at all. The default implementation of ISI functions

such as IsiGetAssembly(), IsiGetNextAssembly(), IsiCreateCsmo(),

Advertising