{$IFDEF debug}
k := 0;
if buf.Way = 1 then
s1 := '接收'
else if buf.way = 2 then
s1 := '发送';
s := '';
WriteLog('----------------' + s1 + '--start--------------------');
for i := 0 to len - 1 do
s := s + ' ' + IntToHex(buf.buf[i], 2);
WriteLog(' ' + s);
{$ENDIF}