Show/Hide Toolbars

Irinos Measurement System

Navigation: MscDll Reference Guide > API (programming interface) > Notifications

MSC_SetNotificationMessage

Scroll Prev Top Next More

This function enables sending Windows messages as notifications.

Details for receiving Windows messages can be found in the documentation of your development tools.

 

Definition


MSC_STATUS
MSC_SetNotificationMessage(
    MSC_HANDLE Handle,
    int OpCode,
    HWND hWnd,
    ULONG MsgCode,
    ULONG wParam,
    ULONG lParam
);

 

Parameter


Handle

Device-Handle, which has been returned by a previous call of the function MSC_OpenDevice.

Opcode

oOpcode of the static channel (opcRS, opcRHS oder opcBIO). A notification message will be sent, if new data has arrived for the respective opcode.

o-1 for a notification in case of a communication timeout (see MSC_Start).

oThe opcode of the dynamic measurement (opcRDM1 oder opcRDM2). If the receive buffer of the respective dynamic measurement is full, a notification message will be sent.

hWnd

A Windows-handle, which receives the Windows message.

MsgCode

Message number, which must be defined by the application (see also comment below).

wParam

The wParam of the Windows message.

lParam

The lParam of the Windows message.

 

Return value


If successful, MSC_STATUS_SUCCESS will be returned. In case of an error, an error code will be returned.

 

Comments


The notification is only used for devices and for static and dynamic data transfer channels.

A device notification reports about a communication error.

For a static data transfer channel, the notification is sent each time new data has arrived (-> once per send period).

For a dynamic data transfer channel, the notification is only sent, if the receive buffer is completely full.

The notification can be cleared, if the function is called with the parameter hWnd = NULL.

 

MsgCode


The message-number is defined by the application. Using Visual C++, this can be done for example as follows:

#define WM_MESSAGE_MSC_READSTATIC   (WM_USER + 0)
#define WM_MESSAGE_MSC_BITIO        (WM_USER + 1)
#define WM_MESSAGE_MSC_HW_STATUS    (WM_USER + 2)

 

See also


MSC_OpenDevice

MSC_Start