Rule #5:
Design smart Interfaces (Required)
External Interfaces require a reduced set of parameter types (e.g. no POINTER).
They should be optimized for the use with CFC.
They should use the "Common Behavior Model"
Internal interfaces can use the full set of parameter types.
We can distinguish between two types of interfaces
External Interfaces –- Accessed by the end user application
Internal Interfaces –- All other Interfaces!
For external interfaces we propose to use a reduced set of parameter types. With this, the end user has no need to use dangerous or complicated data types like POINTER or the ADR() operator. Interfaces should be optimized for the use with CFC. It is a good practice to reuse the "Common Behavior Model" to build function block interfaces for end users. Libraries, which are especially implemented regarding end user requirements, will be indicated by a special quality mark.
The following property:
IsEndUserLibrary (Bool) := True | False
marks libraries which are especially suitable for the usage by end users.
Resource Management
Asynchronous function blocks
Synchronous functions with safe handles
Usage of a "Common Behavior Model" (CBM)