adsSyncAddDeviceNotificationReqEx
A notification is defined within an ADS server (e.g. PLC). When a certain event occurs a function (the callback function) is invoked in the ADS client (tread-safe).
An AdsCallbackObject must be created to be able to receive information about the desired events. This must be assigned to a listener that implements the CallbackListenerAdsState interface. The listener is called as soon as the event occurs.
long adsSyncAddDeviceNotificationReqEx (
long lj_port,
AmsAddr lj_AmsAddr,
long lj_indexGroup,
long lj_indexOffset,
AdsNotificationAttrib lj_pNoteAttrib,
long lj_hUser,
JNILong lj_pNotification
);
Parameter
- long: lj_port port number of an ADS port that had previously been opened with AdsPortOpenEx or AdsPortOpen.
- AmsAddr lj_AmsAddr: object with NetId and port number from ADS server.
- long lj_indexGroup: Index Group
- long lj_indexOffset: Index Offset
- AdsNotificationAttrib lj_pNoteAttrib: AdsNotificationAttrib object containing additional information about the event message.
- long lj_hUser: user handle
- JNILong lj_pNotification: JNILong buffer which contains the notification number after the call.
Return value
long: returns the error state of the function.