You must provide a discriminator subroutine. The Modem Manager will call this subroutine when it offers you an incoming call. The Modem Manager passes a BUFFER as a parameter. This Buffer contains the initial data received from the line (see HelloPacketLength). You should parse this data and decide whether or not your driver supports it, and for which STATION it is intended.
• Return INVALID to reject this call.
• Return a valid STATION number to accept the call.
• If you accept the call, then the Port\IsConnected() module will go true. You can then obtain the serial port semaphore Port\Sem() to read and write data via the serial port.
• If Port\IsConnected() becomes false, the call has been disconnected.
• If you wish to hang up the call, call the subroutine Port\CallComplete().