beautypg.com

ClearOne Writing StreamNet User Manual

Page 56

background image

Writing StreamNet Device Drivers

D-4

All specifications subject to change without notification. All rights reserved. Copyright © 2005 NetStreams

Main +1 512.977-9393 / fax +1 512.977.9398 / Toll Free Technical Support +1 866-353-3496

3600 W. Parmer Lane, Suite 100; Austin, TX 78727 /

www.netstreams.com.

elseif( nBand == FM ) then

szFreq = "FM "..Frequency

else

szFreq = Frequency

end

setCaption(szFreq)

debug("verbose", "Frequency is "..szFreq)

end

else

-- This is all V1 Stuff

if( nExpectedRX == FREQUENCY_FIRST ) then

if( message:len() >= 2 ) then

message = message:match("%d+")

local nMessage = tonumber(message)

-- if the first part of the frequency is less than 20

then we assume that the band is AM

if( nMessage < 20 ) then

nBand = AM

szFreq = "AM "

else

nBand = FM

szFreq = "FM "

end

szFreq = szFreq..message

end

nExpectedRX = FREQUENCY_LAST

elseif( nExpectedRX == FREQUENCY_LAST ) then

if( message:len() > 2 ) then

message = message:match("%d%d")

if( nBand == AM ) then