
CP1413plus manual
H1 Driver V3.xx for Windows NT
Rev. 00/07
7-43
7.6.2.3.8 Read data
#include <H1Def.h>
unsigned short WENTRY_C H1LeseDaten(H1_RECPARAMS W_POINTER rec)
This function is used to read data. It will only return to the caller when data has been received or
when the connection has been terminated.
Parameters
rec
pointer to a structure containing receive parameters. The parameters
Vnr
,
DataLen
and
SendLen(=0)
must be specified. The buffer
located at the end of the structure must have a length of
sizeof(H1_RECPARAMS) + DataLen
.
Possible values returned by
rec.Fehler
are:
0
H1_BLOCKED_DATA
H1_BAD_LINE
H1_NO_DRIVER
H1_NO_ADAPTER
H1_NOT_SUPPORTED
Returns
< >
0
An error has occurred in the operating system.
0
The
rec.Fehler
element contains one of the above values.
Note
This function only returns to the caller when data was received successfully or when
a timeout has occurred. Where large quantities of data are received resulting in the
H1_BLOCKED_DATA message, you must ensure that
H1LeseDaten
is called
repeatedly until all data has been transferred. In this case the
RecLen
parameter is
used as input and as return parameter.
RecLen
must be set to the correct value
before the function is called and it represents the offset of the data. When the
function completes, it returns the length of the data block read in
RecLen
. This
length must be deducted from
DataLen
every time another read function is initiated
(see example).
The functions
H1StarteLesen/H1AbfrageLesen
are available for starting and
checking the read function repeatedly (polling). You may not use both
H1LeseDaten
and
H1StarteLesen/H1AbfrageLesen
tasks for a single
connection.
The driver must have been opened by means of
H1DriverOpen
and the respective
connection must have been established by means of
H1StarteVerbindung
.
Summary of Contents for CP 1413plus
Page 2: ...jkjlj...
Page 8: ...Contents CP1413plus manual iv Rev 00 07...
Page 10: ......
Page 16: ...Special features CP1413plus manual 1 6 Rev 00 07...
Page 18: ......
Page 38: ...Standards and specifications CP1413plus manual 2 20 Rev 00 07...
Page 40: ......
Page 104: ...Entry into protocol file H1PROT_NIF CP1413plus manual 3 64 Rev 00 07...
Page 106: ......
Page 178: ...PLC Layer 7 program interface CP1413plus manual 4 72 Rev 00 07...
Page 180: ......
Page 194: ......
Page 206: ...ksdjfk...
Page 306: ......
Page 317: ...Appendix A Technical data A 1 B Abbreviations B 1 C List of figures C 1 D Index D 1...
Page 318: ...dfgdfgfdg...
Page 324: ...List of figures CP1413plus manual C 2 Rev 00 07...