Home  Contents

Received data

Finger Core4 Lua Event System

SYNOPSIS

  1. cmd, param, size, flag = fgrhandle:rxHeader()
  2. addr, cmd, param, size, flag = fgrhandle:rxHeader("net")
  3. header = fgrhandle:rxHeader("raw")
  4. length = fgrhandle:rxSize()
  5. length = fgrhandle:rxAvailable()
  6. data = fgrhandle:rxData([i [, j]])

DESCRIPTION

This group of functions provide access to the current response from the finger scanner. Accessing the response is possible even while it is being received.

RETURN VALUE

All functions return nil if no data is available.

The spfinger:rxHeader() function returns the received header. The passed parameter selects the returned format.

spfinger:rxSize() returns the size of the data part of the received message. The data may not be fully received yet. spfinger:rxAvailable() returns the number of bytes already received.

spfinger:rxSize() returns a string containing the requested data. The optional parameters i and j select the substring of the data[i], data[i+1], ···, data[j]. The default value for i is 1, the default for j is the length of the data.

SEE ALSO