Skip to main content

Step 3: Create Submodule "Switch Simple"

The second switch module, which we want to declare, is a simplified one with only two states: on and off. Therefore a module declaration and a function block have to be created, which are adapted from the "Dim-Switch" above. A new interface of type ISwitchSimple is used for the function block. Another difference is, that the variable xIn should be declared as BOOL variable and no parameter tTimer is needed at all.

Step 4: Create Submodule "Light"