A DTMF (telephone-event) tone. More...
Public Member Functions | |
| fm.liveswitch.dtmf.Tone | clone () |
| Clones this instance. More... | |
| fm.liveswitch.dtmf.Tone | clone (int duration) |
| Clones this instance. More... | |
| int | getDuration () |
| Gets the duration in milliseconds. More... | |
| boolean | getEnd () |
| Gets whether this is the final tone raised for the current value. More... | |
| String | getValue () |
| Gets the value. More... | |
| String | toJson () |
| Serializes to JSON. More... | |
| Tone (String value) | |
| Initializes a new instance of the fm.liveswitch.dtmf.Tone class. More... | |
| Tone (String value, int duration) | |
| Initializes a new instance of the fm.liveswitch.dtmf.Tone class. More... | |
| fm.liveswitch.dtmf.Packet | toPacket (int clockRate) |
| Serializes to a packet. More... | |
| String | toString () |
| Serializes to a string. More... | |
Static Public Member Functions | |
| static fm.liveswitch.dtmf.Tone | fromJson (String toneJson) |
| Deserializes from JSON. More... | |
| static fm.liveswitch.dtmf.Tone[] | fromJsonArray (String tonesJson) |
| Deserializes an array from JSON. More... | |
| static fm.liveswitch.dtmf.Tone | fromPacket (fm.liveswitch.dtmf.Packet packet, int clockRate) |
| Deserializes from a packet. More... | |
| static fm.liveswitch.dtmf.Tone[] | fromToneString (String toneString) |
| Converts a DTMF tone string into an array of tones. More... | |
| static fm.liveswitch.dtmf.Tone[] | fromToneString (String toneString, int duration) |
| Converts a DTMF tone string into an array of tones. More... | |
| static fm.liveswitch.dtmf.Tone[] | fromToneString (String toneString, int duration, int interToneGap) |
| Converts a DTMF tone string into an array of tones. More... | |
| static fm.liveswitch.dtmf.Tone | getA () |
| Gets A tone. More... | |
| static String | getAValue () |
| Gets the A value ("A"). More... | |
| static fm.liveswitch.dtmf.Tone | getB () |
| Gets the B tone. More... | |
| static String | getBValue () |
| Gets the B value ("B"). More... | |
| static fm.liveswitch.dtmf.Tone | getC () |
| Gets the C tone. More... | |
| static String | getCValue () |
| Gets the C value ("C"). More... | |
| static fm.liveswitch.dtmf.Tone | getD () |
| Gets the D tone. More... | |
| static String | getDValue () |
| Gets the D value ("D"). More... | |
| static fm.liveswitch.dtmf.Tone | getEight () |
| Gets the eight tone. More... | |
| static String | getEightValue () |
| Gets the eight value ("8"). More... | |
| static fm.liveswitch.dtmf.Tone | getEmpty () |
| Gets the empty tone. More... | |
| static String | getEmptyValue () |
| Gets the empty value (""). More... | |
| static fm.liveswitch.dtmf.Tone | getFive () |
| Gets the five tone. More... | |
| static String | getFiveValue () |
| Gets the five value ("5"). More... | |
| static fm.liveswitch.dtmf.Tone | getFour () |
| Gets the four tone. More... | |
| static String | getFourValue () |
| Gets the four value ("4"). More... | |
| static fm.liveswitch.dtmf.Tone | getHash () |
| Gets the hash tone. More... | |
| static String | getHashValue () |
| Gets the hash value ("#"). More... | |
| static fm.liveswitch.dtmf.Tone | getNine () |
| Gets the nine tone. More... | |
| static String | getNineValue () |
| Gets the nine value ("9"). More... | |
| static fm.liveswitch.dtmf.Tone | getOne () |
| Gets the one tone. More... | |
| static String | getOneValue () |
| Gets the one value ("1"). More... | |
| static fm.liveswitch.dtmf.Tone | getPause () |
| Gets the pause tone. More... | |
| static int | getPauseDuration () |
| Gets the pause duration in milliseconds (2000). More... | |
| static String | getPauseValue () |
| Gets the pause value (","). More... | |
| static fm.liveswitch.dtmf.Tone | getSeven () |
| Gets the seven tone. More... | |
| static String | getSevenValue () |
| Gets the seven value ("7"). More... | |
| static fm.liveswitch.dtmf.Tone | getSix () |
| Gets the six tone. More... | |
| static String | getSixValue () |
| Gets the six value ("6"). More... | |
| static fm.liveswitch.dtmf.Tone | getStar () |
| Gets the star tone. More... | |
| static String | getStarValue () |
| Gets the star value ("*"). More... | |
| static fm.liveswitch.dtmf.Tone | getThree () |
| Gets the three tone. More... | |
| static String | getThreeValue () |
| Gets the three value ("3"). More... | |
| static fm.liveswitch.dtmf.Tone | getTwo () |
| Gets the two tone. More... | |
| static String | getTwoValue () |
| Gets the two value ("2"). More... | |
| static fm.liveswitch.dtmf.Tone | getZero () |
| Gets the zero tone. More... | |
| static String | getZeroValue () |
| Gets the zero value ("0"). More... | |
| static String | toJson (fm.liveswitch.dtmf.Tone tone) |
| Serializes to JSON. More... | |
| static String | toJsonArray (fm.liveswitch.dtmf.Tone[] tones) |
| Serializes an array to JSON. More... | |
| static String | toToneString (fm.liveswitch.dtmf.Tone[] tones) |
| Converts an array of DTMF tones into a tone string. More... | |
A DTMF (telephone-event) tone.
| fm.liveswitch.dtmf.Tone.Tone | ( | String | value | ) |
Initializes a new instance of the fm.liveswitch.dtmf.Tone class.
| value | The value. |
| fm.liveswitch.dtmf.Tone.Tone | ( | String | value, |
| int | duration | ||
| ) |
Initializes a new instance of the fm.liveswitch.dtmf.Tone class.
| value | The value. |
| duration | The duration. |
| fm.liveswitch.dtmf.Tone fm.liveswitch.dtmf.Tone.clone | ( | ) |
Clones this instance.
| fm.liveswitch.dtmf.Tone fm.liveswitch.dtmf.Tone.clone | ( | int | duration | ) |
Clones this instance.
| duration | The new duration. |
|
static |
Deserializes from JSON.
| toneJson | The JSON. |
|
static |
Deserializes an array from JSON.
| tonesJson | The JSON. |
|
static |
Deserializes from a packet.
| packet | The packet. |
| clockRate | The clock rate. |
|
static |
Converts a DTMF tone string into an array of tones.
Each tone will have a duration of 100ms and an inter-tone gap of 100ms.
| toneString | The tone string. |
|
static |
Converts a DTMF tone string into an array of tones.
Each tone will have an inter-tone gap of 100ms.
| toneString | The tone string. |
| duration | The duration, in milliseconds (minimum of 40, maximum of 2,000). |
|
static |
Converts a DTMF tone string into an array of tones.
| toneString | The tone string. |
| duration | The duration, in milliseconds (minimum of 40, maximum of 2,000). |
| interToneGap | The time between tones, in milliseconds (minimum of 40). |
|
static |
Gets A tone.
|
static |
Gets the A value ("A").
|
static |
Gets the B tone.
|
static |
Gets the B value ("B").
|
static |
Gets the C tone.
|
static |
Gets the C value ("C").
|
static |
Gets the D tone.
| int fm.liveswitch.dtmf.Tone.getDuration | ( | ) |
Gets the duration in milliseconds.
|
static |
Gets the D value ("D").
|
static |
Gets the eight tone.
|
static |
Gets the eight value ("8").
|
static |
Gets the empty tone.
|
static |
Gets the empty value ("").
| boolean fm.liveswitch.dtmf.Tone.getEnd | ( | ) |
Gets whether this is the final tone raised for the current value.
|
static |
Gets the five tone.
|
static |
Gets the five value ("5").
|
static |
Gets the four tone.
|
static |
Gets the four value ("4").
|
static |
Gets the hash tone.
|
static |
Gets the hash value ("#").
|
static |
Gets the nine tone.
|
static |
Gets the nine value ("9").
|
static |
Gets the one tone.
|
static |
Gets the one value ("1").
|
static |
Gets the pause tone.
|
static |
Gets the pause duration in milliseconds (2000).
|
static |
Gets the pause value (",").
|
static |
Gets the seven tone.
|
static |
Gets the seven value ("7").
|
static |
Gets the six tone.
|
static |
Gets the six value ("6").
|
static |
Gets the star tone.
|
static |
Gets the star value ("*").
|
static |
Gets the three tone.
|
static |
Gets the three value ("3").
|
static |
Gets the two tone.
|
static |
Gets the two value ("2").
| String fm.liveswitch.dtmf.Tone.getValue | ( | ) |
Gets the value.
|
static |
Gets the zero tone.
|
static |
Gets the zero value ("0").
| String fm.liveswitch.dtmf.Tone.toJson | ( | ) |
Serializes to JSON.
|
static |
Serializes to JSON.
|
static |
Serializes an array to JSON.
| tones | The array. |
| fm.liveswitch.dtmf.Packet fm.liveswitch.dtmf.Tone.toPacket | ( | int | clockRate | ) |
Serializes to a packet.
| clockRate | The clock rate. |
| String fm.liveswitch.dtmf.Tone.toString | ( | ) |
Serializes to a string.
|
static |
Converts an array of DTMF tones into a tone string.
This discards duration and inter-tone gap data.
| tones | The tones. |