I cannot easily tell what is wrong in your example. However, It might be
helpful to base your C# client on the C++ Traci client (possibly getting
started with an automated language conversion).
see http://sumo.dlr.de/wiki/TraCI/C%2B%2BTraCIAPI

If you are interested in supporting the SUMO community, please consider
making your C# client available once it is finished.

regards,
Jakob

2016-05-27 10:26 GMT+02:00 Carlos Biurrun <[email protected]>:

> Hello everybody,
> I am working on some C# functions to connect to SUMO and retrieve data
> from it.
> However, I have a problem with the response given by the server after
> sending a SimulationStep command. Since I don't have any subscription, I
> guess the answer would be just "number of following subscription responses
> = 0", but I am receiving the number ".
> However, in the following code, I am receiving an strange answer:
>
>                 int aux = binRe.ReadInt32();
>                 Console.WriteLine("Readbytes: " + aux);
>                 for (int i = 0; i < aux; i++)
>                 {
>                     if (binRe.PeekChar() != -1)
>                     {
>                         Console.WriteLine("Reading byte " + i + ": " +
> binRe.ReadByte());
>                     }
>                     else {
>                         Console.WriteLine("NO!!! i="+i);
>                         break;
>                     }
>                 }
>
> The values that are being printed on console are (each "Readbytes: x"
> implies an execution of a different SimulationStep):
>
> Readbytes: 251658240
> NO!!! i=0
> Readbytes: 519
> NO!!! i=0
> Readbytes: 0
> Readbytes: 0
> Readbytes: 118423552
> NO!!! i=0
> Readbytes: 2
> NO!!! i=0
> Readbytes: 0
> Readbytes: 0
> Readbytes: 34017024
> NO!!! i=0
>
> How is it possible?
> Thank you for your attention,
> Carlos.
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to