ClearOne Writing StreamNet User Manual
Page 70
Writing StreamNet Device Drivers
D-18
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.
-- function QueryStatus()
-- Diego Alfarache
-- 09-21-2006
-- Do a periodic check for status
function QueryStatus()
-- request the status so we know the initial state of everything
if( nResponseTimeout ~= 0 ) then
nResponseTimeout = nResponseTimeout - 1
if(nResponseTimeout <= 0) then
nTimeouts = nTimeouts + 1
-- errorLog(&SystemLog, "CControlZTuner: Timeout waiting ZTuner
response, %d, %d", m_nExpectedRX, m_nTimeouts);
nRefreshPowerTimeout = 0
if(nTimeouts >= 10) then
PerformReset()
else
CheckPower()
RequestV2Status()
end
end
else
if(nRefreshPowerTimeout > 0) then
nRefreshPowerTimeout = nRefreshPowerTimeout - 1
end
if(nRefreshFreqTimeout > 0) then
nRefreshFreqTimeout = nRefreshFreqTimeout - 1
end
if(nRefreshFreqTimeout <= 0) then
RefreshFrequency()
elseif(nRefreshPowerTimeout <= 0) then
CheckPower()
end
end
-- try again in 5 seconds if this is from a timer
return 5000