.Buffrq Method

Top  Previous  Next

 

Function:

Pre-requests "numpages" number of buffer pages (1 page= 256 bytes) for the TX buffer of the wln object.

Syntax:

wln.buffrq(numpages as byte) as byte

Returns:

Actual number of pages that can be allocated (byte).

See Also:

Allocating Buffer Memory

 


Part

Description

numpages

Requested numbers of buffer pages to allocate.

Details

Actual allocation happens when the sys.buffalloc method is used. The wln object will be unable to operate properly if its TX buffer has inadequate capacity (more on this in the Allocating Buffer Memory topic). The Wi-Fi interface will only be able to successfully send out packets that fit in this buffer; larger packets will be truncated. There is no need to allocate any buffer for packet reception.

Buffer allocation will not work if the Wi-Fi hardware is already operational (wln.enabled= 1- YES). Executing sys.buffalloc at this time will leave the buffer size unchanged. Therefore, buffer allocation must happen before the Wi-Fi hardware is booted up with the wln.boot method.

Actual current buffer size can be verified through the wln.buffsize read-only property.