ChoiceOptionFunction class added.
- Modified pulsesrc to use ChoiceOptionFunction.