ygSwitch derived from ygNode | Example | Source | Header |
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 changed to on | |
switchOff | the switch has changed to 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 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
0.1 the switch has changed to on
method off
0.1 the switch has changed to off
method toggle