
12.3.18.3 Functions
native Switch_Init(mode, funcidx=-1);
Initialises the solenoid switch
Parameter
Explanation
mode
Selection of whether the solenoid switch is evaluated by the firmware or script
SWITCH_MODE_
INTERNAL :
If the button was pressed and held for 3 sec., a
transmission is initiated when the button is
released.
SWITCH_MODE_SCRIPT : In the event of a state change of the button (press
or release), the public function, for which the
index was transferred to the "Switch_Init"
function, is called.
funcidx
Index of the public function that should be executed in the event of a state change
of the button (only necessary if mode=SWITCH_MODE_SCRIPT)
Type of function: public func(key);
Explanation
Return value
l
OK, if successful
l
< OK, if an error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 84)
native Switch_Close();
Deactivates the solenoid switch. An action is no longer initiated when the button is pressed.
Explanation
Return value
l
OK, if successful
l
< OK, if an error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 84)
158
Rev. 01