ReadFromSocketEx - method of object PmData

It is an extension of the ReadFromSocket method.
ReadFromSocketEx(nType As Integer, nSubType As Integer, nFrom As Long, nCount As Long) As Boolean
b = oData.ReadFromSocketEx(nType, nSubType, nFrom, nCount)
nType(Integer) Subtype of the data protocol
nSubType(Integer) Version of the data protocol subtype
nFrom(Long) Index (zero-based index) of the variable in the object from which (including) the data are received
nCount(Long) The number of variables in the object that are received
Return Values:
true - The method successfully queued the request for reading from the server. After data transfer the onEndOfTransfer event will be fired.
false - The method hasn't queued the request for reading data. Probably the previous message about sending/receiving by sockets of this object hasn't been finished yet. The onEndOfTransfer event is not fired.

This method is not functional for PmFree.

It enables the user to specify the subtype of the data protocol by which will communicate it with the server and for example the value and number of values of the PmData object from which the data received from the network will be written into the object. The exact meaning of the nFrom and nCount parameters can depend on the nType and nSubType parameters.

Supported subtypes of the protocol:

nType nSubType meaning
0 0 protocol for the transfer of the whole PmData object. Parameters nFrom and nCount are ignored.
1 1 this enables to enter by the nFrom and nCount parameters from which value and how many values of the object have to be received.
The method only activates the data transfer but there is no assurance that data are already transferred after ending this method. The data transfer termination is announced by the event onEndOfTransfer.

Calling this method is meaningful only if the Sockets page is configured as the Socket client.

Variables on the Data page of this object are filled up by the incoming data.

See also:
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice