//发送
Var
TmArr
acked array [1..81] of char;
_pos:word;
tmb:byte;
begin
_pos:=1;
tmb:=$01;
move(tmb,TmArr[_pos],SizeOf(Byte));
inc(_pos,SizeOf(Byte));
tmb:=$1F;
move(tmb,TmArr[_pos],SizeOf(Byte));
inc(_pos,SizeOf(Byte));
move(string('12')[1],TmArr[_pos],2);
inc(_pos,2);
move(string('23456')[1],TmArr[_pos],5);
inc(_pos,5);
nmudp1.sendbuffer(TmArr,_pos-1);
end;
//接受
Var
TmArr
acked array [1..81] of char;
_pos:integer;
tmb:byte;
begin
nmudp1.readbuffer(TmArr,_pos);
//再按照呢指定的格式分析即可。
end;