Infosys在阅读器中打开 / AI 翻译

ADS · 0 次阅读

adsSyncAddDeviceNotificationReq

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.

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 adsSyncAddDeviceNotificationReq(
  AmsAddr                lj_AmsAddr,
  long                   lj_indexGroup,
  long                   lj_indexOffset,
  AdsNotificationAttrib  lj_pNoteAttrib,
  long                   lj_hUser,
  JNILong                lj_pNotification
);

Parameter

  • 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.