error = asi.startScanning(portFoundCallback [, object])
Scans for ASI ports. A second call to startScanning while already scanning does not reset the process. If a rescan is desired, call stopScanning first and then startScanning to reset the process.
Parameter |
Type |
Description |
---|---|---|
portFoundCallback |
in function |
Callback to receive ports found, one call per port. |
object |
in any (optional) |
If an object is provided, it will be passed as the first parameter to the specified callback function. The object can be of any type except nil. |
error |
out string (optional) |
If successful nil is returned, an error message otherwise. |
Introduced in platform.apiLevel = '2.7'.
portFoundCallback ([object,] port)
The callback function provided in startScanning will be called for every ASI port found. The port parameter will be a port object representing the port interface found. One call per port found. Ports maybe present at the moment of calling asi.startScanning() or later added while scanning. Ports are reported only once between startScanning/stopScanning cycles.
Parameter |
Type |
Description |
---|---|---|
object |
in any |
If an object was provided as a parameter to the function startScanning, it will be passed as the first parameter to this callback function. |
port |
in port object |
One port found during scanning. |
Introduced in platform.apiLevel = '2.7'.