Declaration
unsigned int (_stdcall * ReadFromLine)(HOBJ StID, void * Data, unsigned int MaxData);
Parameters
StIDStation ID.
DataPointer to a buffer, where the received data is to be stored.
MaxDataSize of the buffer Data.
Description

The function returns data that were received on Serial, MOXA IP Serial Library, SerialOverUDP Device Redundant or TCP-IP/TCP, line.

Return value

Number of received bytes.

Note: The following applies to TCP-IP/TCP line:

  • calling the ReadFromLine function triggers an attempt to establish a connection unless the connection has already been established
  • in case of an error (broken or closed TCP connection) the function ReadFromLine returns a value 2^32-1, i.e. 4 294 967 295
  • subsequent calling of the ReadFromLine or WriteToLine functions will cause an attempt to re-established the connection
  • if the connection is established, the requested operation is executed (ReadFromLine- reading data, WriteToLine - writing data)
  • if multiple IP addresses (separated by a comma or semicolon) are configured in the line configuration, the KOM process cyclically uses them to establish a connection to these IP addresses

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .