PDA

View Full Version : DeviceLink



Halcon0653
12-02-2005, 12:13 PM
Hi all,

I'm reading carefully the DeviceLink posts, and I'd like to give my point of view about this tool, and try to make it more useful for BoB, ( or maybe for PF next patch http://forums.ubi.com/images/smilies/59.gif)

Now the the game works as a server with DeviceLink. And This is I think the weakest point. It must be waiting for a command, and later answer that command. So, can't be very fast because the speed of the game is the most important, and can lose some commands.

In my opinion http://forums.ubi.com/images/smilies/11.gif, now there are many devices in the shops that can perform all the buttons need for the game. (I have an joystick Saitek X52, and I assure you I can't use all the buttons). I think the best solution is to let this devices make its work

So I propose three ways:

One: The external application sends a query packet, for example - RR/40/42/44/46/48/50, and now the game retuns - A/40\534.3/42\250/44\230/46\0.00/48\10.00/50\50.50
When finishes sending this packet, the game send this again, for ever and ever until for example push a boton on your joystick.

Second: When the game begins, it send the packet in the same way, but sends ALL the parameters.

In this ways, the game doesnt't need to wait, and can send the parameters very fast.

Three: Put the parameters in a know memory positions and let another aplication read and send them.

Thanks for all, and sorry about may english. I hope this can be usefull, and open the path for the ones who dream with virtual cockpits. http://forums.ubi.com/images/smilies/25.gif

Halcon0653
12-02-2005, 12:13 PM
Hi all,

I'm reading carefully the DeviceLink posts, and I'd like to give my point of view about this tool, and try to make it more useful for BoB, ( or maybe for PF next patch http://forums.ubi.com/images/smilies/59.gif)

Now the the game works as a server with DeviceLink. And This is I think the weakest point. It must be waiting for a command, and later answer that command. So, can't be very fast because the speed of the game is the most important, and can lose some commands.

In my opinion http://forums.ubi.com/images/smilies/11.gif, now there are many devices in the shops that can perform all the buttons need for the game. (I have an joystick Saitek X52, and I assure you I can't use all the buttons). I think the best solution is to let this devices make its work

So I propose three ways:

One: The external application sends a query packet, for example - RR/40/42/44/46/48/50, and now the game retuns - A/40\534.3/42\250/44\230/46\0.00/48\10.00/50\50.50
When finishes sending this packet, the game send this again, for ever and ever until for example push a boton on your joystick.

Second: When the game begins, it send the packet in the same way, but sends ALL the parameters.

In this ways, the game doesnt't need to wait, and can send the parameters very fast.

Three: Put the parameters in a know memory positions and let another aplication read and send them.

Thanks for all, and sorry about may english. I hope this can be usefull, and open the path for the ones who dream with virtual cockpits. http://forums.ubi.com/images/smilies/25.gif

WWSensei
12-03-2005, 01:25 PM
The best way to optimize Devicelink is to do away with the whole String passing of A and R commands. Each command takes 64 bytes. Hugely wasteful and inefficient. You can fit every single one of the toggle commands as binary switches in a single 32 bit data structure like a long int. 4 bytes instead of the ridiculous number it is now.

For the non-toggle commands they could still fit easily into 4 bytes instead of the 64 they have now. You could query and get results for 16 commands in the time and data it takes to get one.

I used to do datalink protocols long ago for the military and looking at Devicelink I think you could minimize the entire command set into one command for the toggle switches and about 20 unique 4 byte commands for all the rest.

Diablo310th
12-03-2005, 02:12 PM
I have no idea what all you both just said....but I love Devicelink. WWsensei your idea sounds really good. Have you approached Oleg with it?

Halcon0653
12-04-2005, 04:27 AM
Yes wwwsensei,
in your way, you would improve the devicelink. But I dont think that it could reach the speed it would reach with my option.

I'm thinking about, for instance, a speed that can send a 10 values packet 100 times in a second (more or less). So you have a precise and smooth value.

http://forums.ubi.com/images/smilies/1072.gif or.... As you are a professional, and I not, maybe i'm using my devicelink in a bad way??

Can I ask you where do you find, (or how have you done) your program to manage the UDP protocol in the master PC?, what speed can you reach?
Can you please send it to me? http://forums.ubi.com/images/smilies/11.gif amayayluis@terra.es

WWSensei
12-05-2005, 06:34 AM
If they converted to using a more compressed method then something like 10 values in 1/100 of a second would be simple. They are already using UDP which is the fastest protocol widely available so raw speed isn't going to increase--so you need to get more data out in the same amount of time.

As for approaching them with the idea--yes, I've sent an email or two. It isn't rocket science. Most programmers writing net code learn this concept. It's just programming 101 stuff. Oleg's crew has proven over and over he has smart programmers. I get the feeling with Devicelink that it is slapped on with much laziness.

Halcon0653...as for what I use to manage the UDP stuff I wrote my own wrapper in C++. It was publicly available and will be again soon when I finish version 2 of it. It isn't an application unto itself but more of a library for someone writing an app.

Working at such a low level is how I've come to learn just how terribly inefficient devicelink link.

Halcon0653
12-05-2005, 04:35 PM
http://forums.ubi.com/images/smilies/25.gif
Thanks WWWSensei. I've found your devicelink program. unfortunately I don't work with C++, so I can't compile yor program. http://forums.ubi.com/images/smilies/351.gif

Hope your 2.0 version would be avaiable in .EXE way too. http://forums.ubi.com/images/smilies/16x16_smiley-happy.gif

Thanks a lot for all guy.

WWSensei
12-08-2005, 06:13 AM
well, it won't be in an .exe way. It isn't intended to be an application itself. It's a wrapper for someone who wants to write an application exe to make using Devicelink easier.

I don't do user interfaces. My personal programming background is low level device drivers, network protocols, and 3 vector state space analysis for path determination.

I do run 4 programming teams now and still don't do user interfaces. I hire people for that because I generally don't like dealing with...what do you call them?...oh yeah...people. ;-)

rssmps
12-12-2005, 03:03 PM
WWSensi,

do you have a link to the wrappers that you wrote? Thanks!

WWSensei
12-13-2005, 10:13 AM
I've taken version 1 offline for the time being. Version 2 is under testing at the moment and should be up soon. Work-wise my teams have just shipped one of our bigger products to manufacturing so I'll have some more free time to finish it up.

Biggest difference between version 1 and 2 is that I did a lot more to prevent buffer overflows, upgraded the compiler to Visual Studio 2003, ran more unit tests with C++ Test, and providing far better documentation. Also made it it multi-thread safe though I do no threading of my own.

BM357_Hawki
12-15-2005, 12:46 PM
Be nice if they really got their act together for BOB and provide us with a SDK and full API documentation not to mention a 3d plugin for GMAX so we can model our own buildings, scenery etc.

Best Example of this is found in TRAINZ 2006.
Heads up!!