- bishandle.receiveMTD16 = function(bishandle, addr, mtd16)
- bishandle.receive = function(bishandle, addr, ptype, data)
- bishandle:clearCallbacks()
SYNOPSIS
DESCRIPTION
When a block of data is received via the BiS protocol, the BiS handle will run a callback function. Any callback will get the original bishandle and also the address of the peer that sent the message. In slave mode, the address parameter contains no useful information.
Form 1 is called whenever a MTD16 formatted message is received. The received message is provided in mtd16 as a MTD16 instance.
Form 2 is called for any other type of message. ptype provides the PType field of the BiS header and data is a string with the payload data.
The function bis:clearCallbacks() will set all callback handlers to nil. Using bis:clearCallbacks() instead of just assigning nil makes sure that all callbacks are cleared, even if future releases of the software support more callbacks than documented here.
NOTES
Callbacks are called from within event:poll().