AdsReadStateReq

The method AdsReadStateReq permits to send an ADS read state command for reading the ADS status and the device status from an ADS server. The AdsReadStateCon will be called on arrival of the answer.

Syntax


int AdsReadStateReq(AmsAddr& rAddr, ULONG invokeId);

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.

Return value

Type: int

Error code - see AdsStatuscodes.