Sub Manager_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
Dim beacon1 As Beacon = Parser.Parse(AdvertisingData, RSSI)
If beacon1 <> Null Then
'a beacon was discovered.
'find the beacon type based on the BeaconType field.
Select beacon1.BeaconType
Case Parser.TypeiBeacon
Dim ib As iBeacon = beacon1.SpecificData
Log($"iBeacon: ${ib.uuid} (${ib.major}/${ib.minor})"$)
Case Parser.TypeEddystoneUID
Dim euid As EddystoneUID = beacon1.SpecificData
lLog($"Eddystone UID: ${euid.Namespace}:${euid.Instance}"$)
Case Parser.TypeEddystoneURL
Dim eurl As EddystoneURL = beacon1.SpecificData
Log($"Eddystone URL: ${eurl.url}"$)
End Select
End If
End Sub