[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DDL-ML] INFO GA problems



Robert Nieuwland wrote:
> 
> rob> 'SET GA N 29 0 1 -1#10'
> haba>                    ^^^----???
> >
> haba> Could this upset the parser?
> I can't see why. My switches are switching so Erddcd understands the
> command, but after two time I don't get feedback.
> >
> rob> 'INFO GA N 28 0 1'#$A
> haba>                   ^^^----???
> >
> > Null terminated strings?
> I Use a Delphi function
>   StrFmt(PWisselS,'%s %d %d %d %d%s',['SET GA N',(Decoder*4)+Kanaal,D,
> 1,-1,#10]); to put the output in a PChar. This is a null terminated string
> type.

Never use null terminated strings, SRCP specifies a "real" linefeed as the
end of a command. zeros are at best ignored, or lead to a crash ;=)

Another hint: Commands like SET produce no response (as of version 0.7.3 of
the SRCP). You have to send them blindly. In SRCP 0.8 that behavior is changed
substantially. There all commands send a response to the client. The INFO mode
almost always tells you, that the command was _executed_, that is far more than
a simple "Ok, I've got your command".


What software you are developing/using?? 

Ahoi
Matthias

-- 
http://members.tripod.de/mtrute/