Messages |
on | set the switch to on | |
off | [bool] | set the switch to off |
toggle | toggle the state of the switch |
Events |
SwitchOn | the switch has turned on | |
SwitchOff | the switch has turned off |
Comments |
constructor ygSwitch
1 create pfSwitch for the pfnode
destructor ~ygSwitch
method reset
1 if net master then set the switch to on
method message
1 set the switch to on
2 set the switch to off
3 toggle the state of the switch
method app
0.1 the switch has turned on
0.1 the switch has turned off
method appTraverse
1 start timing
2 execute app method
3 if switch is on
3.1 call appTraverse recursively on all children4 end timing
method isOn
method on
method off
method toggle