C# Class GSF.Media.Sound.TouchTone

Touch tone generator.
Inheritance: DTMF
显示文件 Open project: GridProtectionAlliance/gsf Class Usage Examples

Private Properties

Property Type Description
TouchTone System
TryParseKey bool

Public Methods

Method Description
GetTouchTones ( string keys ) : GSF.Media.Sound.DTMF[]

Get array of touch tones for given string.

Non-touch tone characters are ignored. Commas are interpreted as a one second pause.

GetTouchTones ( string keys, double keyDuration, double interKeyPause ) : GSF.Media.Sound.DTMF[]

Get array of touch tones for given string.

Non-touch tone characters are ignored. Commas are interpreted as a one second pause.

Parse ( char key ) : TouchTone

Converts the character representation of a touch tone key into an instance of the TouchTone class.

TouchTone ( Char key ) : System

Constructs a new TouchTone for specified touch tone key character.

TouchTone ( TouchToneKey key ) : System

Constructs a new TouchTone for specified touch tone key.

TouchTone ( int key ) : System

Constructs a new TouchTone for specified touch tone key number.

TryParse ( char key, TouchTone &result ) : bool

Converts the character representation of a touch tone key into an instance of the TouchTone class. A return value indicates whether the conversion succeeded.

Private Methods

Method Description
TouchTone ( ) : System
TryParseKey ( char key, TouchToneKey &result ) : bool

Method Details

GetTouchTones() public static method

Get array of touch tones for given string.
Non-touch tone characters are ignored. Commas are interpreted as a one second pause.
public static GetTouchTones ( string keys ) : GSF.Media.Sound.DTMF[]
keys string String of touch tone characters to convert to touch tones.
return GSF.Media.Sound.DTMF[]

GetTouchTones() public static method

Get array of touch tones for given string.
Non-touch tone characters are ignored. Commas are interpreted as a one second pause.
public static GetTouchTones ( string keys, double keyDuration, double interKeyPause ) : GSF.Media.Sound.DTMF[]
keys string String of touch tone characters to convert to touch tones.
keyDuration double Duration of touch tone key press in seconds, typically fractional.
interKeyPause double Time to wait between key presses in seconds, typically fractional.
return GSF.Media.Sound.DTMF[]

Parse() public static method

Converts the character representation of a touch tone key into an instance of the TouchTone class.
is not a valid touch tone character.
public static Parse ( char key ) : TouchTone
key char A character containing a touch tone key to convert.
return TouchTone

TouchTone() public method

Constructs a new TouchTone for specified touch tone key character.
is not a valid touch tone character.
public TouchTone ( Char key ) : System
key Char Character of touch tone to create.
return System

TouchTone() public method

Constructs a new TouchTone for specified touch tone key.
public TouchTone ( TouchToneKey key ) : System
key TouchToneKey Touch tone to create.
return System

TouchTone() public method

Constructs a new TouchTone for specified touch tone key number.
is not a valid touch tone number.
public TouchTone ( int key ) : System
key int Number of touch tone to create (note that * = 10 and # = 11).
return System

TryParse() public static method

Converts the character representation of a touch tone key into an instance of the TouchTone class. A return value indicates whether the conversion succeeded.
public static TryParse ( char key, TouchTone &result ) : bool
key char A character containing a touch tone key to convert.
result TouchTone /// When this method returns, contains an instance of the /// class equivalent to the touch tone key, if the conversion succeeded, or null /// if the conversion failed. The conversion fails if the /// parameter is not a valid touch tone.
return bool