Call MgslEnableReceiver with the enable flag set to TRUE to allow receiving data from the remote station. Call MgslReceive to get received data from the API buffers or block until receive data becomes available. After calling MgslReceive, monitor the event object until signaled, indicating receive completion. The call completes after receiving one HDLC frame or sufficient data to fill the buffer size specified by the application in other modes. After completion, the receive status value indicates if the received data has any errors. If the received data has no errors, then the data is returned in the application specified return buffer.
The API discards data received after the API buffers are full, so the application must retreive data from the API faster than it is received in order to avoid losing data.
The receiver remains enabled until the application calls MgslEnableReceiver with the enable flag set to FALSE.
The Addr member of the MGSL_PARAMS structure passed to MgslSetParams specifies if the adapter should filter HDLC frames based on a single byte address field. Specifying 0xFF forces the API to return all received frames regardless of the address field. Specifying other values will cause the API to return frames with a matching address field or frames with the broadcast address of 0xFF. This feature only works for 8-bit address fields. When working with extended addresses, set this parameter to 0xFF to return all received frames.
Enabling the HDLC_FLAGS_AUTO_DCD option in the MGSL_PARAMS structure causes the receiver to recognize incoming frames only when DCD is active. Disabling this option causes the receiver to operate independently of the DCD signal.
| Previous | Contents | Next |