Promotic

NetReplyDatagram - method of the AtouchX object

Description:
Asks to write a datagram with the response.
The method stores the transmitted datagram with the response into the specified database variable and then sends it over the network to the station specified by the StreamId parameter. The writing is asynchronous, after the writing is finished the EndNetPutData event is triggered, which notifies the result of the communication. The Param value is also passed to the event, which is used by the user to self-identify.
 
The content written must match the specified database variable. If written to a simple database variable, then the DATA must be a simple value. If a matrix is written, then the DATA must be a 2-dimensional array whose number of rows and columns matches the dimension of the variable being written. in this case, the initial indices of DATA do not matter, but only the dimensions. When writing just one element of a db. matrix, DATA can be both a simple value and a 2-dimensional array of one row and one column. The
 
DATA must be of such a type that its values can be written to a database variable without loss of information.
Syntax:
Integer NetReplyDatagram(Long WID, Long StreamId, Long Param, Variant DATA)
Parameters:
WID(Long) WID of the database variable, which is filled with the datagram with the response and sent.
StreamId(Long) Identifier of the source of the datagram being responded to. The value is presented to the user by the driver in the DbDatagram event.
Param(Long) The value that is passed unchanged to the write termination event.
DATA(Variant) Written content (i.e. datagram with response).
Return value:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nWID = 2005;
var nStreamId = 5;
var nParam = 65;
var DATA = 24;
var nState = oATC.NetReplyDatagram(nWID, nStreamId, nParam, DATA);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.