AdsWriteControlInd
The AdsWriteControlInd method can be used to send an ADS write control command to change the ADS and device state of an ADS device. The AdsWriteControlRes must be called to confirm the process.
Syntax
void AdsWriteControlInd( AmsAddr& rAddr, ULONG invokeId, USHORT adsState, USHORT deviceState, ULONG cbLength, PVOID pDeviceData );
Return value
void
Parameter
Name | Type | Description |
|---|---|---|
rAddr | AmsAddr& | [in] Structure with NetId and port number of the ADS server. |
invokeId | ULONG | [in] Handle of the command, which was sent. The InvokeId is specified by the source device and is used for the identification of the commands. |
adsState | USHORT | [in] contains the index group number (32-bit, unsigned) of the requested ADS service. |
deviceState | USHORT | [in] contains the index offset number (32-bit, unsigned) of the requested ADS service. |
cbLength | ULONG | [in] contains the length in bytes of the data (pData). |
pData | PVOID | [in] pointer to the data buffer in which the written data are located. |