Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 2 1 2
#4542499 - 10/28/20 03:41 PM Data Export  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Guys,

Could somebody please, please, please explain to me how the data exporting works (with a bit of detail) and where in memory the exported data gets stored.

Send me a PM if you want my email address to do it that way.

Thanks in advance,

Andy


Andy's simpit: http://www.simpit.me.uk
#4542682 - 10/29/20 11:30 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2010
Posts: 1,883
messyhead Offline
Member
messyhead  Offline
Member

Joined: Dec 2010
Posts: 1,883
Although I've worked n the code, I don't know how the export works. Javelin was the last to work on that area, I think, so he'd probably be your best bet. But the forums have been pretty quiet, so not sure who's still around.

#4542731 - 10/30/20 03:03 PM Re: Data Export [Re: AndyB]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
When you say 'Export' what do you mean? Exporting MFD screens? Exporting data through the CommServer to an external gauge display?
Each data type is handled radically different from another.
Javelin

#4543229 - 11/03/20 12:49 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Javelin,

It's the data export through Comm Server I'm interested in.

I'd like to know how the values for indicators, guages etc get from internal to the sim out to the PC's memory and where in that memory they are placed.

I'd also like to know the process that CommServer uses to pickup that data and transfer it to an external program such as SIOC.

I believe that there is a request for a value somewhere from SIOC to CommServer. but what happens then ?

If possible I'd like to monitor the area of PC memory that the data is stored to see if it is changing ( there are many programs out there to do this).

Any help would be brilliant.

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4543502 - 11/05/20 03:59 AM Re: Data Export [Re: AndyB]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
Hi Andy,
I have no idea how to use the data, I've never done that. I only know that the exported values are listed in the Values.cpp file.
The CommSIOCClient and CommUDPServer work with the game engine to export the values to the Client, which you somehow link to your gauges.
You need to talk to someone who actually has a cockpit with working gauges.
Sorry I'm not any help.
Javelin

#4543530 - 11/05/20 01:29 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
HI Javelin,

Thanks for replying anyway.

Cheers,

andy


Andy's simpit: http://www.simpit.me.uk
#4544713 - 11/12/20 06:49 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
Hi, Andy. sorry for disappearance - my win7 died, and outdated comm programs doesn't seem to work with latest version. Can be fixed by recompiling client/server or game exe, but don't really have time to configure all that from scratch. But I can propose some code analyzes instead.

Most related ingame code stored in "sharedmem.c" file. Here script create object "shared_memory_t" type with "EECHSharedMemory" name (it is important) that will be used as data container for lamps states, upfront display, basic dynamics - pitch roll engines data etc. Full list in update_dynamics_shared_mem() function, also waypoints and weapons. Problem in any of the function can stop process, so it's worth to check debug version in case some asserts triggered (or at least enabled debug logging option in eech.ini).

Shared memory initialization happen on game load, single message should appear:
Initialising Shared Memory

And another one can appear after it if something wrong:
Failed to initialise shared memory


Last changes in this file:

by javelin 20.07.2019 (Commserver Fix, Joystick Deadbands Fix, Havoc Engine Gauges Added)
Two new variables was added - num_flares and num_chaff. looks safe, even if these values can be extracted from weapons data array (I guess, maybe not). Version was changed from 3 to 4 (so only latest version of commserver/client can be used - i.e. compiled after value was changed).

by messyhead 27.03.2020 (Updating ekran display)
ka50 ekran data added, looks ok. version was not changed.


And now how EECHCommUDPServer.exe reading and sending shared data.

Program using CreateFileMapping function to load shared file "EECHSharedMemory", parse it data and send to the client by TCP or UDP (not sure how it chose which one is required).
To debug network exchange, you can add debugLevel value to the application args, like:

> EECHCommUDPServer 1234 1

so you will see in the console what is going on between client and server.

So first thing to check that your server/client EXEs was compiled after 20.07.2019 so they have new version number. or even maybe after 27.03.2020 as server uses same variables list? not sure but it may be an issue you experiencing.
Maybe some programs exists that can load shared memory file by name so you will see that game pushing some data.
Hope this information helps somehow. If not, I may try to make compilers work and test whole process some day.

#4544735 - 11/12/20 08:34 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Thealx,

Sorry to hear about your Windows dying. Hope you can get it fixed OK.

I tried running EECH 1.16.1 (didn't see any messages about Shared Memory during starting up) and used EECHCommUDPSpeed program (with the debug option enabled) that was in the cohokum folder when game installed. I assume it is the correct version as it was bundled with it.

I took a screenshot of the results from the CommUDPSpeed window.

In the UDPSpeed.log file there are only numerous lines (9 per second) stating "Error in data".

It looks to me like the program is outputing data but not in a form that the others can understand.

Cheers,

Andy

Attached Files Image1.jpg

Andy's simpit: http://www.simpit.me.uk
#4544736 - 11/12/20 08:37 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
nope, comm client/server included into release are NOT valid, you need to use files that Javelin sent to you.

#4544739 - 11/12/20 09:06 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Thealx,

Yeah, just realised that a few minutes ago.

He had sent me a file "cohokum-test-14.exe" which I renamed to "cohokum.exe" and copied to cohokum folder (after renaming original).

Created a shortcut to file "EECHCommUDPServer" that he also sent me. This files timestamp is 07/07/2019.

Got everything fired up and going. Some of the data works !! All the floating point stuff can be seen changing in the debug window (heading,airspeed,vert speed,bar altitude, rad altitude combined torque,g force,fuel weight and time of day).

All the indicators values are at zero.

Andy


Andy's simpit: http://www.simpit.me.uk
#4544741 - 11/12/20 09:24 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
BTW although the data was changing in the debug window nothing was happening on the UDPSpeed screen.

I set the ip setting in the udpspeed ini file to 192.168.2.131 ( the machine everything is running on) and also tried localhost.

Don't seem to be talking to each other.


UDPSpeed log file still only showing lots of "error in data".

Andy


Andy's simpit: http://www.simpit.me.uk
#4544750 - 11/12/20 10:23 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
More stuff.

There are 18 indicator requests showing "0" in the debug window.

These are: 508,509,510,511,512,516,517,518,519,525,526,528,529,531,532,534,535,537

However, there are also another 19 that should be there but aren't.

These are: 501,502,503,504.505,506,507,513,514,515,520,521,522,523,524,527,530,533,536


There are also 5 request for data for indicator "1" per request line, which does not exist on the list I have. It's these requests which are generating the "INVALID COMMAND" errors.

Have attached another screen capture of this.

Cheers,

Andy

Attached Files Image1.jpg

Andy's simpit: http://www.simpit.me.uk
#4544753 - 11/12/20 10:40 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
are you still using this test cohokum exe file? you could try current version instead.

looks like variables not match in server, client and the game. maybe after latest changes in these files.

#4544756 - 11/12/20 10:57 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Thealx,

Switched over to original cohokum.exe and it's exactly the same. Floating point data changing on debug window. Still getting "INVALID COMMAND" responses and noting changes in UDPSpeed screen.

Very strange !!! It concerns me more than just for the UDPSpeed stuff. I was intending updating my simpit to the latest version, but I'm worried that it will stop all the indicators in the pit working.

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4544828 - 11/13/20 05:51 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Thealx,

I have a wee bit of success to report.

I installed a package called "Packet Sender" on my laptop.

I started EECH and started up EECHCommUDPServer in debug mode.

I then sent a request string from my laptop to it "R/518" (navigation lights status). On the debug screen I saw the request listed and the reply also show as zero.

I then went in to the game and switched the navigation lights on. I repeated the above and the reply this time was "1".

So, from this test I think we can assume that EECHCommUDPServer is indeed working and returning data for proper requests.

It looks as if the problems are with the UDPSpeed program not asking for the data in the correct manner.

I also tried Javalin's "TestCommServer" in debug mode. I had to switch to TCP on the Packet Sender program, but the request was received. Unfortunately TestCommServer then closed down without a response.

Anyway, I think I'm getting somewhere, I'm just not sure where exactly !!!!

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4544850 - 11/13/20 10:49 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Thealx,

Some more results of my testing for you.

In the UDPSpeed folder there are a load of folders. In each folder is a .ini file. By opening them in turn I noticed that the parts that make up the frame of the dash (MFDs Top, Left, Middle, Right and Bottom) were all sending request strings of "1". I changed this to 20 (time of day) and the "INVALID" messages dissappeared.

I accidentally switched the top left panel to label mode instead of exiting and - everything started working. All the values and indicators. I opened the ini file in the "01 Left Panel" folder and noticed that one of the lines for the graphics didn't match. Instead of "Bitmap=Commanche_gearfail_L.bmp" which is the name of the graphic, it had "Bitmap=Commanche_gearfail_lit.bmp". I changed the line to match the graphic name and saved it. Unfortunately when I made the panel "Pibor" all the data stopped working. Switch it back to "Label" and the data works (but you can't see the landing gear panel).

Obviously at some point in the past somebody has changed the graphic and forgot to update the line in the ini file.

Will keep plodding away at it.

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4544852 - 11/13/20 11:23 PM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Last Post of the evening.

A wee picture of what I've got to so far.

(please excuse the co-pilot lying around on the job)

Cheers,

Andy

Attached Files 20201113_231715.jpg

Andy's simpit: http://www.simpit.me.uk
#4544884 - 11/14/20 06:23 AM Re: Data Export [Re: AndyB]  
Joined: Dec 2010
Posts: 1,883
messyhead Offline
Member
messyhead  Offline
Member

Joined: Dec 2010
Posts: 1,883
What's the program you're using on the 2nd monitor?


I've never used data export until recently as I've not had 2 monitors till now. But I only had it set to export MFD on the extra monitor (which is just my laptop main screen, and I play using the external monitor)

#4544894 - 11/14/20 11:35 AM Re: Data Export [Re: AndyB]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Messyhead,

It's called UDPSpeed and ai believe a modder called Retro came up with it many years ago.

I've zipped the files and put the zip on my simpit site for you to download. http://www.simpit.me.uk/UDPSpeed/UDPSpeed.zip

Stick the UDPSpeed folder in the C:\ drive and put the EECHCommUDPServer.exe in the root of the C:\.

To run:

Create a shortcut to the EECHCommUDPSpeedServer.exe on your desktop adding "10000" after the location. This tells it to listen on port 10000.
Double click the UDPSpeed.exe file in the UDPSpeed folder. That should bring up the dashboard. You may need to move the graphics around to suit your screen.
Start EECH and when you get to the first menu do ALT+TAB back to the desktop.
Double click the shortcut you made earlier on the desktop. You should get a DOS style box saying "Listening on port 10000".
Go back to the game and continue. When you get in to the cockpit you should see all the indicators working. There is still a problem with the top left section with the landing gear indicators that I'm working on.

You will have to play about with the MFD export locatiosn in EECH to get them in the two windows.

If you need any more help please let me know.

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4545002 - 11/15/20 07:26 AM Re: Data Export [Re: AndyB]  
Joined: Dec 2010
Posts: 1,883
messyhead Offline
Member
messyhead  Offline
Member

Joined: Dec 2010
Posts: 1,883
Thanks, I'll give it a go.

Does it have cockpits for other helos, or just the Comanche?

Page 1 of 2 1 2

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0