DLM Events

DLM event types and the structure of a DlmEvent are defined in dlmdef.h. Each event contains a type code in the type field. Additional information about the event may be contained in the event's tag and flag fields. The auxiliary function dlm_EventMessage() converts event type codes into human-readable strings.

The following event types are defined:

Note: Monitor events sent to the server do not generate callbacks in the monitor.

dlm_EVENT_DATA
A single, complete data frame from the tap.

The tag field contains a data tag code indicating type of data error, if any:


(The auxiliary function dlm_DataTagMessage() converts data tag codes into human-readable strings.)

The size field contains the total number of bytes in the frame.

The count field indicates how many bytes of the frame are actually appended to the event.

The timestamp field indicates the tap relative time in milliseconds that the frame was received or sent.

The source field indicates whether the frame was sent by the application local to the tap or by the remote program:


(The auxiliary function dlm_SourceMessage() converts source codes into human-readable strings.)
dlm_EVENT_SIGNALS
A signal state change from the tap.

The tag field contains the signal flags which have changed since the last signal update.

The flag field contains the signal flags indicating the current state of all physical signals at the tap:


Check if a signal is changed or high using bitwise and of the manifest constant with the value in the flag field.

The timestamp field indicates the tap relative time in milliseconds that the frame was received or sent.
dlm_EVENT_CONNECT_REQUEST
The monitor connection request to the server.
dlm_EVENT_CONNECT_FAILURE
The monitor connection request failed.
dlm_EVENT_CONNECT_ACCEPT
The server accepts the monitor connection request to monitor data on a particular line. The monitor must then authenticate to actually start receiving tap status information and protocol data.
dlm_EVENT_CONNECT_REJECT
The server has rejected the monitor connection request.

The tag field contains a DLM API error code indicating the reason the connection was rejected.
dlm_EVENT_CONNECT_TIMEOUT
The monitor connection request has timed out.
dlm_EVENT_DISCONNECT
The sender of the event is terminating the connection.
dlm_EVENT_START
The monitor requests that data flow be resumed.
dlm_EVENT_STOP
The monitor requests that data flow be stopped, but the connection maintained.
dlm_EVENT_PROTOCOL_ERROR
An DLM protocol error occurred.

The tag field contains a DLM API error code indicating the nature of the failure.
dlm_EVENT_SESSION_STOP
The monitor session is complete and has returned to the Open state. This is always the last event for which a callback will be received unless the monitor issues another call to dlm_MonConnect().
dlm_EVENT_REGISTRATION
The tap registers itself as a data source.
dlm_EVENT_SESSION_STATUS
Server message to the monitor regarding the state of the tap.

The tag field contains a session status code indicating the current state of the tap.


(The auxiliary function dlm_StatusMessage() converts status codes into human-readable strings.)

The flag field contains the last reported state of the physical signals.
dlm_EVENT_AUTHENTICATION
Monitor authentication message to the server.