beautypg.com

ClearOne Writing StreamNet User Manual

Page 68

background image

Writing StreamNet Device Drivers

D-16

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.

end

-- function CheckPower()

-- Diego Alfarache

-- 09/21/2006

--

function CheckPower()

-- Ignore commands if we are waiting on a response

if(true == bIsV2 or nResponseTimeout ~= 0) then

return

end

WriteMessage("R 1 1%0D")

nResponseTimeout = 5

nExpectedRX = POWER_STATE

nRefreshPowerTimeout = 5

end

-- function PerformReset()

-- Diego Alfarache

-- 09/21/2006

--

-- Note: This uses an undocumented command sequence to request a

-- hard reset of the zTuner.

function PerformReset()

WriteMessage("W 1 20 1%0D")

nTimeouts = 0

nResponseTimeout = 0

nRefreshPowerTimeout = 10

nRefreshFreqTimeout = 12

end

-- function CheckPower()

-- Diego Alfarache

-- 09/21/2006

--

function RequestV2Status()

WriteMessage("R 1 13%0D")

nRefreshFreqTimeout = 5

end