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

Re: [DDL-ML] INFO GA problems



> > 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.
>
> Looks like string (%s) #10 instead of character decimal 10 (newline)
> to me. Can you just telnet to the info port (12347) to see what is
> going on there, without any unknown (to the rest of us) program
> involved? I suspect the parser not being very happy because the token
> tokVALUE is just the -1 and if there is additonal stuff (besides
> whitespace) between the -1 and the newline (char decimal 10), the
> parser will not match. And it is a bit difficult to determine if the
> >> ' << are sent, but probably not ;-)
The >>'<< are not send. But you are right, there must me something in the
string that the parser  doesn't like.
In Telnet I see, when I sent string's from my programm, only 'INFO GA N 28 0
1'#$A
but when I sent from simpleclient 'nset 29' I see
'INFO GA N 28 0 1'#$A
'INFO GA N 28 0 0'#$A
And I can do this as often as I want, it keeps sending feedback.
Ones the feedback stops comming because of the misbehaviour of my program it
does restart when I start sending 'nset 29' from simpleclient.
Why does it only blok one switch? Strange or perhaps not.
>
> Another idea is to recompile/relink erddcd, but with -D_DEBUG_ for
> srcp.c which will enable some printf commands in handleSETGA().
> Output from these might be helpful.
>
When I enable debug in srcp.c as you descriped is it then possible to see
what string comes in at Erddcd? Like to know what I an sending. The strange
thing is that the switches are working.
The same thing I do for loco commands and Feedback works fine there. Like to
know what difference there is in the string's I'm sending?
Where should I put that -D_DEBUG_ ?

Rob Nieuwland.