Hello Pete,
and thank you very much for FSUIPC as well as for outstanding support to the community.
Currently I'm working on a small ATC-Client for a group of enthusiasts, flying together using the FSHostClient/Server system.
So far I've been able to figure out 98% of what is needed in my opinion.
Now I stuck on a (I suppose) more or less simple problem which I could also reproduce in your TrafficLook (also thanks for that handy tool).
Actually I'd try to read from the AIPlaneInfo (FSUIPC-SDK) for each of the MP-Planes amongst other info the Com1 frequency.
For some reason It is always and for all connected MP-planes 124.85MHz.
The code of interest (it's in VB.net):
Public Sub FsxListRefresh() ' =======>> Is kept running by a timer-tick. This fuction fetches the AI-traffic data If AiListUpdate Then ' =======>> AiListUpdate is bool and set 'active' when my program is connected to FSUIPC/FSX Me.lstFSXoriginalAI.Items.Clear() ' =======>> My List of "collected data" for all MP-planes For Each Plane As AIPlaneInfo In FSUIPCConnection.AITrafficServices.AllTraffic ' ========>> get all the AI-Info that is available in general If AiListUpdate Then Me.lstFSXoriginalAI.Items.Add(Plane.ID & "Com1String:" & Plane.Com1String & "Alt:" & Math.Round(Plane.AltitudeDifferenceFeet, 0) & " Com1:" & Plane.Com1.ToString) ' ========>> fill the list Next ' ========>> ... and the next one please ;-) End If End Sub
This runs flawless so far.
When setting a break point at the "NEXT"-line I can move the mouse over the "Plane." and read out a lots of data of the currently handled plane.
When usin FSX's own AI Traffic the COM1 frequencies are different there and they change for the individual AI-planes as they "change their ATC-controller".
But for FSHost-connected multiplayer the COM1 frequency never changes. It is 124.85 and lasts so. Even when closing all (my prog., FSHost, FSX) and restarting all again.
From the simconnect.log which I've dumped during a recent session I see that FSHostClient is used to set up this:
> 81.49807 [190, 64]AddToDataDefinition:DefineID=2, DatumName="COM ACTIVE FREQUENCY:1", UnitsName="Frequency BCD16", DatumType=1, fEpsilon=0.000000, DatumID=21
as a part of the traffic-communication-data-set in its "MP-session".
When FSX is running normally then this is executed acc. simconnect.log: 86.08197 [190] ObjectData: RequestID=0 DefineID=2 dwSize=216
As far as I can see (actually I'm not that good a programer, so may be "guess" is more acurate desription of what I do ;-) the COM1 frequency is transmitted amonst other data.
And this is what I couldn't get solved. "COM_ACTIVE_FREQUENCY:1" is used from both AI and MP (FSHostClient) as far as I could figure out.
May be you could give me a hint on where my mistake is?
I hope my explanation was clear enough. Otherwise I'd be glad to supply more/other information.
Thank you in advance,
JayCee