
Elatec GmbH
Page 38 of 50
byte ModuleReceiveLine(byte &RXData, byte &RXCount,
byte MaxRXCount, byte Timeout)
Receive a line of text from the module. A line of text is the typical response of the module to a
command.
Parameters:
byte &RXData
Reference to an array of bytes, which contains the received ASCII
characters (without carriage return and line feed).
byte &RXCount
The number of received ASCII characters.
byte MaxRXCount
Specifies the maximum number of characters the array RXData can
hold.
byte Timeout
Specifies the time, the function waits for a response. The value is
specified in multiples of 100 milliseconds.
Return:
If the operation was successful, the return value is
TRUE
, otherwise it is
FALSE
.
7.2.5.1.4 Legic Specific Operations
byte LegicGeneric(byte &TXData, byte TXCount, byte &RXData,
byte &RXCount, byte MaxRXCount, byte Timeout)
Send a specific command to the built in module of a Legic reader.
Parameters:
byte &TXData
Reference to an array of bytes which contains the command to be sent
to the module.
byte TXCount
Count of bytes in the specified array of bytes to be sent.
byte &RXData
Reference to an array of bytes (receive buffer) which receives the
answer from the module.
byte &RXCount
Count of bytes, which have been received.
byte MaxRXCount
The size of the receive buffer.
byte Timeout
Timeout time in multiples of 100 milliseconds.
Return:
If the operation was successful, the return value is
TRUE
, otherwise it is
FALSE
.
Please note, that TXData and RXData do contain a telegram without length byte and LRC or CRC.
This information is calculated by the firmware of the TWN3 reader.