From: Jens F. <fa...@me...> - 2009-06-30 11:46:30
|
Hi Dirk, thanks for your advise, You were absolutely right. My Problem is solved now. Regards, Jens On 29 Jun 2009, at 09:48, dir...@pe... wrote: > Hello Jens, > > Well, I have never tried to send so many commands bundled, however, > just a few thoughts to make sure you are not failing at another point: > > >>first an integer incremented with each response > >>second 0x0D > >>and third 0x0C > > since you are asking for edge names to me this actually sounds like > a part of the response, namely : DomainID, Variable (Name), > Identifier (String) > > So just to make sure you interpret the response correctly, > regardless of the number of commands you are sending your response > should look like this: > > MsgLength - Integer > First Part of Response > CmdLength - ubyte > CmdID - ubyte > status - ubyte > StringLength - Integer (=0 if status == 0) > Second Part of Response > CmdLength - ubyte > CmdID - ubyte > flag - ubyte ( 0 since you are just reading values) > Domain - ubyte (0 for road map) > DomainID - Integer (i guess that's the increasing Integer value you > were referring to) > Variable - ubyte (0D for name) > ValueType - ubyte (0C for string since you are asking for the name) > StringLength - Integer > Value - String > [further responses consisting of 1st+2nd part] > > > As i said, just a few thoughts, maybe it helps > > Best Regards, > > Dirk Leistner > Traffic Engineering - Research Department > > Peek Traffic bv > Basicweg 16 > Postbus 2542 > 3800 GB Amersfoort > > http://www.peektraffic.eu > <graycol.gif>Jens Fahnenbruck <fa...@me...> > > > Jens Fahnenbruck <fa...@me...> > 27-06-2009 20:50 > > <ecblank.gif> > To > <ecblank.gif> > sum...@li... > <ecblank.gif> > cc > <ecblank.gif> > <ecblank.gif> > Subject > <ecblank.gif> > [sumo-user] Problems with TraCi Communication > <ecblank.gif> <ecblank.gif> > > Hello, > > I am writing a traci client. And now I have some problems, and I hope > someone out there can be helpfull. > > For reasons of speed I try to bundle a lot of cammands into one TCP > packet. When I understood the message format correct, than we can put > 2^32 bytes of commands in one message, right? because the message > begins with an 32bit integer for message length: > http://sourceforge.net/apps/mediawiki/sumo/index.php?title=TraCI/Protocol#Messages > > I am bundling 4000 commands @ 14 bytes in one message and now I get > weird responses. On http://sourceforge.net/apps/mediawiki/sumo/index.php?title=TraCI/Protocol#Status_Response > it's said that there are 3 possible response types: 0x00, 0xff and > 0x01, but I get an 0x0C What does that mean? > > And I also get only 256 responses. Could it be that I can't send more > than 256 commands even if the length suggested I can send 2^32 > commands? The responses first 3 bytes look alway like this: > > first an integer incremented with each response > second 0x0D > and third 0x0C > > My Commands are all Scenario commands to ask the names of alle edges. > > Kind Regards > > Jens Fahnenbruck > > ------------------------------------------------------------------------------ > _______________________________________________ > sumo-user mailing list > sum...@li... > https://lists.sourceforge.net/lists/listinfo/sumo-user > |