Register (Modem Manager)
(Modem Manager module)
Context |
An object value of the context in which the discriminator module is to be called. |
Station |
A unique identifier for this discriminator instance. |
Priority |
The relative priority of this discriminator to others. Priorities are in the range of 0..99 with numerically higher priorities being called first. |
MediaMode |
specifies the media mode that this discriminator wishes to handle. Typically, this would specify AUDIO to handle incoming audio calls. The default is DATAMODEM which handles normal data calls. Please refer to the Comments section. |
Voice |
If this discriminator is to handle AUDIO calls, then this parameter specifies the text GUID of the voice to be used by the Text-to-Speech engine. |
TimeOutVal |
An AUDIO discriminator generally relies on some human-generated response. This parameter sets the number of seconds that the discriminator runs from before giving up. The default value is 20 seconds. Please refer to the Comments section for further information. |
Name |
Usually Context will, when cast to a text value, identify the name of a variable in \Code whose value is the object context for the discriminator. If this is not the case, then the name should be given here. |
Challenge |
A string to send in response to incoming calls that don't initially transmit any data. |
Comments: |
In order to receive incoming calls, you must first call the Modem Manager's Register method, passing the driver's object value, its station number, and a priority (relative to other drivers). \ModemManager\Register(Root, Station, 10 { Priority ]); You must also provide a discriminator subroutine. This subroutine will be called by the Modem Manager when it offers you an incoming call. The Modem Manager passes as a parameter a BUFFER which contains the initial data received from the line (see HelloPacketLength). You should parse this data and decide whether it is supported by your driver, and for which station it is intended. Return Invalid to reject this call. Return the (valid) station identifier to accept the call. If you accept the call, then the Port\IsConnected() module will go true, and you may acquire the serial port semaphore Port\Sem() and read and write data via the serial port. If Port\IsConnected() goes false, the call has been disconnected. If you wish to hang up the call, call the subroutine Port\CallComplete(). |