This site is being deprecated.

Please see the official X‑Plane Support page for help.

0 votes
asked by (12 points)

I'm trying to create an application that uses the built-in UDP output capabilities. (I'm aware that there are some pitfalls to the UDP system, but it's by far the most efficient way to get at the data I need.) My plan is to:

1) Use ISET to add the client computer as a destination for UDP data.

2) Use the DSEL command to tell X-Plane what "rows" I need.

3) Receive and process the data.

I've written an application that attempts to do this. The DSEL commands work - I'm able to automatically check the boxes for the proper outputs. The problem seems to be with the ISEL command.

I'm setting the "index" value in the ISET struct to 0, assuming that's the local "main" aircraft. That does initiate a data stream to the IP, but the data is not at all what I'm expecting. I'm expecting the same format you get when you manually assign a "Send network data output" destination in Data Output tab. (Which works as expected.) What I get across the wire is a bunch of zeros and occasional 254:

2019/10/22 01:08:32 Unknown message type:  254
2019/10/22 01:08:32 Data:  [-4.2201683e+37 1.7378244e+34 8e-45 0 0 0 0 0]
2019/10/22 01:08:32 Unknown message type:  0
2019/10/22 01:08:32 Data:  [0 0 0 0 0 0 0 0]
2019/10/22 01:08:32 Unknown message type:  0
2019/10/22 01:08:32 Data:  [0 0 0 0 0 0 0 0]
2019/10/22 01:08:32 Unknown message type:  0
2019/10/22 01:08:32 Data:  [0 0 0 0 0 0 0 0]


When I look in the Network tab the connection appears as "Multiplayer machine 1 flying Beechcraft Baron 58 (10.0.1.19)" which is not what I want. I want the "first person" aircraft from this server. The Baron is an AI-flown aircraft.

Does anyone have any sample code that works? Is this another case of the indexes in the ISET command changing? Or am I misunderstanding what you can do with the ISET command?

Thanks in advance,

Steve

2 Answers

0 votes
answered by (5.3k points)

Hi Steve,

I consider you need to have a look at the answer I have provided in the following link found at https://questions.x-plane.com/26494/udp-protocol-change-in-objl-command

Glenn

commented by (12 points)
Thanks, but I don't think this is the same issue that Muglug was facing (I'm not getting that "Was expecting X bytes and received Y" pop-up, though I've seen it before while working on other commands). I'm also under the impression that Laminar doesn't do email support for developer issues.

The simulator is accepting the ISET command. It's just not sending what I'm expecting.

Thanks,

Steve
commented by (5.3k points)
Hi Steve,

Sorry for the slow response.

The message I was trying to convey was not about the problem the reference was having but for you to sort your problem out directly with Laminar Research because I am of the opinion you will not get an answer in this forum.

If you are wanting X-Plane code to solve your problem then I know from others asking for X-Plane code they have been refused such information being made available.

Good luck

Glenn
0 votes
answered by (20 points)
The DataOutput target Index is 64.
If you've sent Index = 0 what you are receiving is the MultiPlayer data as you've told X-Plane MultiPlayer0 is on that address+port.

See Page 15 of the "X-Plane 11\Instructions\X-Plane SPECS from Austin\Exchanging Data with X-Plane.rtfd\TXT.rtf" for the values to use as the Index value
...