Step 5: Create Submodule "Light simple"
The simple light, which is created now, will work together with a simple switch, but can be adapted from Light
above, anyways. Therefore a new module declaration and function block LightSimple
have to be created. Since the function block simply implements the interface ILight
, it will be possible to add lights of different types to a room, later on. The main difference to Light
is, that the variable of the slot has to be of the type ISwitchSimple
in order to avoid wrong switched to be put under a LightSimple
module. Moreover the output of LightSimple
shall be of type BOOL
and is named xSwitchedOn
.