Page 1 of 1

command processor and XML input

Posted: Mon Jul 26, 2010 9:15 am
by ckoehler
Hi,

I am having some trouble sending XML through the command processor. Here's what the command is when I debug the char pointer in GDB, and the XML I am sending:

https://gist.github.com/df72eb72fa7df63c02dd

The "6 " before the command just tells it what to do and (I guess) can be ignored. Notice how some of the middle part of the XML is cut off, but the last two chars are there (the "d>").

Any ideas? I am thinking about just going back to simple sockets and making up my own way of sending and receiving; would that be a better way?
Is there a length limit on the const char* for the command?

Thanks!

Christoph

Re: command processor and XML input

Posted: Mon Jul 26, 2010 7:02 pm
by tod
Notice how it seems to go awry at the end of the first quoted attribute? Seems like your problem might be related to escaping the quote marks. Rather than abandon your xml approach I would probably experiment with sending some long simple commands without quotes to make sure the length isn't the issue. Then maybe try constructing the XML without attributes so you don't need to escape the quotes. If that all works and you really want to use the quoted attributes you will be much closer to knowing what is going wrong.

Re: command processor and XML input

Posted: Tue Aug 03, 2010 1:32 pm
by ckoehler
Good tips, thanks, will give that a shot.

Re: command processor and XML input

Posted: Tue Aug 17, 2010 12:04 pm
by ckoehler
Looks like there's a limit on length. The command is truncated after 78 characters. The odd thing is that the first 76 characters are in order, but the last two are exactly the last two characters of the whole command. So some way or another, the command processor knows about the whole command, just doesn't stick it into the const char array.

Is there any way around that?

The way it looks I will probably have to scrap the command processor and do some custom socket stuff.

Thanks!

Christoph

Re: command processor and XML input

Posted: Mon Aug 23, 2010 11:21 am
by ckoehler
I ended up scrapping the command processor and doing a simple socket thing, and it works beautifully!

Thanks for all the pointers!

Christoph