Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Declaration


Blok kódu
languageesl
themeConfluence
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 via ASYNC or Moxa UDP Redundant Cli/Srv 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 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

Info
titleRelated pages:

D2000 KomAPI - call-back functions