Jump to content

Thrustmaster T.A.R.G.E.T. Device Analyzer Tool shortcomings?


Howell_Kilian

Recommended Posts

I have used this tool for viewing the effect of axis fine-tuning, etc. In this sense it is helpful. However, I wonder why the developers left out the option to physically export (via script, for example) axis values in real time? There is the option to export (record) axis values to a text file, but this is not very useful to me. This tool do also show a small console window reflecting the virtual controller's DirectX outputs in real time.

I would have liked the option to "read" selected axis values in real time. Not precisely, but near similar, to reading data exported from DCS World via a network stream with a simple C# Console Application.

Just a wish.

 

Link to comment
Share on other sites

The simple C (not C#) application you need is the TARGET Script Editor.   It is a C like language, and Thrustmaster included some very powerful functions like importing/exporting data using TCP sockets. 

All Thrustmaster device axes can be read and reported using simple commands like "position = &Joystick[JOYX]".  You can print this info to the TARGET console, write it to a file, or send it to another application using TCP sockets, among other things.  This is for reading Thrustmaster device axis data, but you can similarly see and manipulate DirectX axis data since TARGET takes the device axis data and writes it to variables that drive the DirectX axis.  The same can be said for all buttons.  

 

Link to comment
Share on other sites

@Drakoz 

Thank you for your response. I DO AGREE that the TARGET software have some powerful functions. This is evident by what yourself and other experienced users have achieved. As a novice user of the Script Editor and certainly not an experienced C coder, I have a lot to learn, and must still discover its full capabilities. My original post hinted at a lack of information (in my opinion) provided by Thrustmaster re exporting "data" using TCP sockets. The existing manual nowhere cover this particular topic. I can be wrong and it wouldn't be the first time. Smile.

Link to comment
Share on other sites

Correct, Thrustmaster does not discuss anything about how to do this.  People figured it out by seeing the TCP socket commands in the hid.tmh file (specifically the InitSocketServer() command). I believe you also need to use LoadLibrary() as shown in the sys.tmh file to load the Windows .DLL library that enables TCP sockets.  

People that understand TCP sockets on Windows were able to figure it out.  I haven't done it myself, but there are a few discussions floating around about how to do it.  It is definitely advanced stuff. I mean, with as much as I know about C programming and TARGET, it would still take a lot of trial and error for me to figure it out.  Plus you must write an external program to talk to the TARGET TCP socket, which requires knowing how to do Windows programming (using tools like Visual Studio and C#, C++, or Visual Basic) and the Windows TCP Socket layer.  I think I have seen a couple examples where people have written simple generic TCP socket programs to send and received data to TARGET (or other programs using TCP Sockets). These simple tools can be used with minimal effort to create a debugging tool to test communication with TCP sockets on TARGET.  

This is all about using TCP sockets as a method of interprocess communication.  That is to say, one of the easiest ways for two programs to talk to each other is using TCP sockets.  And since TCP sockets is a networking protocol (as in over Ethernet or WiFi), you can even do it from one computer to another.  To talk to a program on the same computer, you access the localhost IP address (127.0.0.1:xxxx) where xxxx is the socket number.  To talk to a program on another computer, you use the IP address of that other computer.  It could even be an Android, iPhone, Raspberry PI, or even an Arduino as all computers that support networking protocols support TCP sockets.  

As I said, this very quickly goes way beyond simple C programming, but there are examples out there, not just on TARGET related forums, but many other forums about DIY stuff using TCP sockets.  Once you understand TCP sockets on Windows, how to do it in TARGET makes a lot more sense because you realize that TARGET provides the basic commands to needed to load the proper .DLL, and create a server. 
 

P.S. I believe there is at least one discussion of using TCP sockets here on the DCS forums, and also I believe one or more examples on the SimHQ.com forums. 


Edited by Drakoz
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...