Afgeronde rechthoek: Top of book Afgeronde rechthoek: Managers track Afgeronde rechthoek: Technical track Afgeronde rechthoek: Previous page Afgeronde rechthoek: Home






Instances of classes of modules

Like other high-level description elements, modules can be classified into sets of which the members share similar behavior. There are two ways of implementing instances of classes of modules.

        Static instances: These instances are created at system (re)configuration time and their life persists through the active life of the system or until the system is reconfigured.

        Dynamic instances: These instances are created during runtime. Their life ends when they are no longer needed. A garbage collector must take care of the freed memory.

Creating static instances of modules is much less costly in processing time, memory and other required services than creating dynamic instances. Further, it usually happens on non-critical instances.

Reconfiguring a system is done when in the field new system parts are loaded or exchanged against existing parts. It will usually take place during a low-activity mode of the system.

Class-wide Assets

Inside a module, the operations are shared amongst the instances of a class. Each instance has its own set of non-static assets. Inside the instances, these assets behave as static placeholders. It is possible to let some assets behave as class-wide assets. In that case, all instances of the class share these class-wide assets. The instance assets and the class-wide assets can be used to exchange information between tasks. If a task uses a newly created dynamic instance, it has the possibility to keep all non-class-wide assets of this instance completely under its own influence.

Implementation of the Module Class

The implementation of the module class differs from the implementation of the instances of the module. The implementation of the module class contains all class-wide elements of the module. This includes the implementation of the methods and the implementation of the placeholders for the class-wide assets.

Implementation of the Instances

The implementation of the instances consists of the placeholders for the instance-specific assets and a reference to the implementation of the class. If a module contains more than one interface, then the implementation contains a reference to the implementation of the interface for each of these interfaces. One of the interfaces acts as the prime interface. The reference to the implementation of the class always points to the implementation of the prime interface.



Afgeronde rechthoek: Top of page Afgeronde rechthoek: Next page