
263
c.Scan(desc)
Asynchronous API
• AsyncScan(parameters As roAssociativeArray) As Boolean: Begins a channel scan on the RF input
and returns the results immediately. Otherwise, the behavior and parameters of this method are identical
to Scan(). When completed or cancelled, AsyncScan() generates an roChannelManagerEvent, which supports
ifUserData and outputs two types of event:
o 0 – Scan Complete: Generated upon the completion of a scan. No extra data is supplied.
o 1 – Scan Progress: Generated upon every tune that is performed during the scan. GetData() returns the
percentage complete of the scan.
• CancelScan() As Boolean: Cancels any asynchronous scans that are currently running. This method does
not generate an roChannelManagerEvent.
Synchronous Example
c = CreateObject("roChannelManager")
' Scan the channels
aa = CreateObject("roAssociativeArray")
aa["ChannelMap"] = "ATSC"
aa["FirstRfChannel"] = 12
aa["LastRfChannel"] = 50
c.Scan(aa)
' Start at the first channel
index = 0
Commentaires sur ces manuels