5 modem events, 1 m1x22_mdm_event_t, Modem events – Maxim Integrated 73M1822/73M1922 Control Module User Manual

Page 15: M1x22_mdm_event_t, Section 5

Advertising
background image

UG_1x22_053

73M1822/73M1922 Control Module User Guide

Rev. 1.0

15

5 Modem Events

The driver provides event service to the high level application by maintaining a FIFO queue of event
structures, M1X22_MDM_EVENT_t. Events are created by the driver to reflect various conditions as
described in

Section 5.2

. Once created, this new event is added to the FIFO queue and the driver notifies

the application layer via file descriptor status change mechanism. This in turn triggers the application to
request for the event via the M1X22_EVENT_GET IOCTL. Upon retrieval, each event structure is removed
from the FIFO queue after its information is conveyed to the high level application.

To receive this modem event notification the application must register for file descriptor status change
using the standard UNIX select() function. When this function returns the modem event availability
status will reflect in the file descriptor parameter. The FD_ISSET macro can be used for checking the
status, and if available, the application can request for the event using M1X22_EVENT_GET.

5.1 M1X22_MDM_EVENT_t

Description

This structure is used by M1X22_EVENT_GET to retrieve an event from the event queue. The event
structure consists of event ID indentifying the event, the channel ID identifying the modem channel where
the event was generated, the number of remaining events in the queue, and up to four event data that
carries additional information pertaining to that specific event.

Prototype

typedef struct {
unsigned int event_id; /* Event ID */
unsigned int channel_id; /* Channel ID */
unsigned int event_cnt; /* number of remaining queued events */
unsigned int event_data1; /* additional data 1 */
unsigned int event_data2; /* additional data 2 */
unsigned int event_data3; /* additional data 3 */
unsigned int event_data4; /* additional data 4 */
}
M1X22_MDM_EVENT_t;

Parameters

Data Type

Name

Description

unsigned int

event_id

Event ID (see

Section 5.2

).

unsigned int

channel_id

Channel ID.

unsigned int

event_cnt

Number of events that remain in the queue.

unsigned int

event_data1

Event data 1.

unsigned int

event_data2

Event data 2.

unsigned int

event_data3

Event data 3.

unsigned int

event_data4

Event data 4.


Advertising