| iMatix home page
| Libero home page | Libero documentation
| << | < | > | >>
Libero Libero
Version 2.32

Using Get-External-Event

The Get-External-Event module is empty in most types of program, and very important in other ones. This module lets you centralise any kind of interface to the outside world that collects events. An example of this is the Rover subprogram we designed above. The dialog explicitly does a Wait-for-incoming-message before each new state. We can put this code into Get-external-event, which makes the dialog simpler.

Here I also move all handling for Onhook to the Defaults state - assuming that the Stop-Local-Tones module is safe to use at any time:

After-Init:
    (--) Ok                         -> Idle
          +
    (--) Error                      ->
          + Terminate-The-Program

Idle:
    (--) Offhook                    -> Dialing-First
          + Start-Dial-Tone
          + Reset-Dialed-Number
    (--) Request                    -> Ringing
          + Start-Ringing-Local

Dialing-First:
    (--) Digit                      -> Dialing-Next
          + Stop-Local-Tones
          + Have-Dialed-Digit
    (--) Whole-Number               -> Seizing
          + Stop-Local-Tones
          + Send-Outgoing-Request

Dialing-Next:
    (--) Digit                      -> Dialing-Next
          + Have-Dialed-Digit
    (--) Whole-Number               -> Seizing
          + Stop-Local-Tones
          + Send-Outgoing-Request

Seizing:
    (--) Accept                     -> Ringing
          + Start-Ringing-Remote
    (--) Busy                       -> Seize-Failed
          + Start-Busy-Tone
    (--) Reject                     -> Seize-Failed
          + Start-Reject-Tone

Seize-Failed:
    (--) Onhook                     -> Idle
          + Stop-Local-Tones

Ringing:
    !  Events from local phone
    (--) Offhook                    -> Talking
          + Stop-Ringing-Local
    (--) Onhook                     -> Idle
          + Stop-Ringing-Remote
    !  Event from remote phone
    (--) Answer                     -> Talking
          + Stop-Ringing-Remote

Talking:
    !  Event from local phone
    (--) Onhook                     -> Idle
          + Send-Outgoing-Release
    !  Event from remote phone
    (--) Release                    -> Idle
          + Start-Released-Tone

Defaults:
    (--) Onhook                     -> Idle
          + Stop-Local-Tones

| << | < | > | >>
| Using Libero | The Dialog File Syntax | Libero Options | Using Exceptions | Using The Defaults State | Using Sub-Dialogs | Using Super-States | Using Templates | Using Get-External-Event | Efficiency | Care and Feeding of Dialogs | When To Use Libero
iMatix
Copyright © 1996-97 iMatix