Hello Maryam,

There is one more thing I can think of as a source of error given the provided 
information, which is that the setOrder-command should be sent for each client 
*before* sending the first simulationStep-command.

If this does not fix the problem, I’d ask you to provide a more detailed 
description of what you did and what unexpected results you observe – at best a 
minimal failing script or example.

Also keep in mind that the first thing you will read out of the inMsg (after 
the length) should be the 0x03 identifier-ubyte, which acknowledges the 
setOrder-command, not 0x00, which should be the second ubyte.

KG,
Leo



Von: maryam sadat Boka [mailto:ms.bok...@gmail.com]
Gesendet: Donnerstag, 30. November 2017 17:55
An: Lücken, Leonhard
Betreff: Re: [sumo-user] problem with multiple clients of TraCI in sumo 0.31

Hi Leo,

Thank you so much for your reply, it was helpful.

I checked the value of the inMsg, it doesn’t return 0x00, so according to your 
explanation, it means the execution of setOrder is not successful.

and then when the simulationstep is going to run by the first client, the 
function 'check_resultState' fails and it just stuck and doesn’t go further in 
the simulationstep function.

and I think because the setorder has not acknowledged successful , so 
simulationstep doesn’t work.

do you have any suggestion for me ?

Thanks and best regards
Maryam

On Wed, Nov 15, 2017 at 12:10 PM, 
<leonhard.luec...@dlr.de<mailto:leonhard.luec...@dlr.de>> wrote:
Hello,

The response (inMsg) is not supposed to return the assigned order. It returns 
an acknowledgement of the received command (the command id itself 0x03 in case 
of CMD_SETORDER) and a status-flag (0x00 indicates successful execution). So 
you should expect to receive the same response even if you call setOrder(n) 
with different values for n from various clients.

See http://sumo.dlr.de/wiki/TraCI/Protocol for the general protocol specs.

Hope this helps.

Best,
Leo


-----Ursprüngliche Nachricht-----
Von: sumo-user-boun...@eclipse.org<mailto:sumo-user-boun...@eclipse.org> 
[mailto:sumo-user-boun...@eclipse.org<mailto:sumo-user-boun...@eclipse.org>] Im 
Auftrag von maryam sadat Boka via sumo-user
Gesendet: Dienstag, 14. November 2017 22:30
An: sumo-u...@lists.sourceforge.net<mailto:sumo-u...@lists.sourceforge.net>
Betreff: [sumo-user] problem with multiple clients of TraCI in sumo 0.31

Hi,

As new version of SUMO (0.31) supports the multiple clients of TraCI, I have 
implemented it in c++ API.

The problem is that the function of setOrder which is implemented in 
TraCIAPI.cpp , does not work correctly since if i set the input value of the 
function as 1 (setorder(1)), the value of message which is sent to the socket 
is nor 1 (outMsg =! 1 ), neither same as the value of message of checking 
function
(check_resultState(inMsg) -> inMsg=! 1).

it means the setting value for setOrder function does not depend on input 
value, both setOrder(1) and setOrder(2) send same message with same value to 
the socket !

so the value can not be set correctly, then simulation step won't work!

It would be great if anybody can help.

Thanks and best regards
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
sumo-user mailing list
sumo-u...@lists.sourceforge.net<mailto:sumo-u...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org<mailto:sumo-user@eclipse.org>
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to