Insteon PLM Ruby Code 350

From LinuxMCE
Revision as of 01:28, 6 January 2008 by Ddamron (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
#### Written by Dan Damron
#### #350 Process Incoming Data ####
buff = ''
#$recvbuff = ""
while(true)
  buff=conn_.Recv(128,50)
  if(buff.length() == 0)
    break
  end
  $recvbuff = $recvbuff + buff
end
debugin($recvbuff)
#while $recvbuff[0] != 0x02
#	log("GARBAGE IN: %X" %$recvbuff[0])
#	if $recvbuff.length == 1 
#		$recvbuff = ''
#	else
#		$recvbuff = $recvbuff[1..-1]
#	end
#end
#log('Processing Incoming data...sending to plmparse!')
$recvbuff = plmparse($recvbuff)