AdsAddDeviceNotificationReq

The method AdsAddDeviceNotificationReq permits to send an ADS add device notification command, for adding a device notification to an ADS device. The AdsAddDeviceNotificationCon will be called on arrival of the answer.

Syntax


int AdsAddDeviceNotificationReq( AmsAddr& rAddr, ULONG invokeId, ULONG indexGroup, ULONG indexOffset,
    AdsNotificationAttrib noteAttrib);

Parameters

rAddr: (type: AmsAddr&) [in] structure with NetId and port number of the ADS server.

invokeId: (type: ULONG) [in] handle of the command, which is sent. The InvokeId is specified from the source device and serves to identify the commands.

indexGroup: (type: ULONG) [in] contains the index group number (32 bit, unsigned) of the requested ADS service.

indexOffset: (type: ULONG) [in] contains the index offset number (32 bit, unsigned) of the requested ADS service.

noteAttrib: (type: AdsNotificationAttrib) [in] contains specification of the notification parameters (cbLength, TransMode, MaxDelay)

Return value

Type: int

Error code - see AdsStatuscodes.