Jump to content
The simFlight Network Forums

cknipe

Members
  • Posts

    54
  • Joined

  • Last visited

About cknipe

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Not Telling
  • Location
    Earth

cknipe's Achievements

Rookie

Rookie (2/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

1

Reputation

  1. Hi Pete & John, Just a quick question. Is there any significant updates planned towards FSUIPC in terms of SimConnect / MSFS? For me personally, the only one drawback that I have over using SimConnect vs. FSUIPC is injecting and controlling AI models. I am sure that there are a few other things that we can do with SimConnect where FSUIPC simply just does not have the functionality. By no means is this aimed as criticism, I prefer to use FSUIPC over SimConnect due to the ease of use and easy integration. I guess I am just wondering, any possibility of seeing more advanced features in the future in FSUIPC? It's almost like FSUIPC is very good at a read only client from the Sim's perspective, but it's not doing a lot in terms of injecting data (AI Models or otherwise) into the Simulator. Many thanks, Chris.
  2. Found some other debugging code that interfered with this. For the loop, this seems to work Do Until myEventQueue.IsEmpty Dim mySimEvent As New Offset(Of Integer)("SendControl", &H3110, True) Dim mySimEventParams As New Offset(Of Integer)("SendControl", &H3114, True) Dim myEvent As SimEvents myEventQueue.TryDequeue(myEvent) mySimEventParams.SetValue(myEvent.MouseID) mySimEvent.SetValue(myEvent.EventID) SimLogger.Trace("Sending Control {0} with parameter {1}", myEvent.EventID, myEvent.MouseID) FSUIPCConnection.Process("SendControl") mySimEvent.Disconnect() mySimEventParams.Disconnect() FSUIPCConnection.DeleteGroup("SendControl") Loop Don't think I need the Disconnect() and DeleteGroup() call, but I can't use the Offsets declared globally (threaded application). I must declare them at each use (which is strange).
  3. After a night's sleep... Those two statements solved it in a few seconds. FSUIPC log window showed that it got the events twice, and that made me think. You said offsets are sent as soon as they are written to 3110. So I removed the Process() call, and then things started working correctly as the event is only sent once to the simulator. However, now it doesn't matter what I sent, the simulator keeps getting the same Event For example, I sent via FSUIPCClient: 2023-08-30 08:37:11.0297 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 79693 with parameter 536870912 2023-08-30 08:37:11.0297 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 69693 with parameter 536870912 FSUIPC Log window reports 36825016 *** EVENT: Cntrl= 79873 (0x00013801), Param= 536870912 (0x20000000) <79873> 36825016 *** EVENT: Cntrl= 69873 (0x000110f1), Param= 536870912 (0x20000000) <69873> Not sure what is going on here, but the Client DDL isn't doing what it is supposed to be doing. 1) If I don't call Process() the same event is sent over and over, irrespective of what the value of the Event Offsets are (so they don't update) 2) If I do call Process(), everything is sent twice to the simulator (and no, I am not calling Process() elsewhere) - which explains the unexpected results with the switch Guards as the guard is triggered twice
  4. Very useful to know, but it doesn't solve the issues. Loop currently reads (simplified for debugging purposes): ' Process any queued events Do Until myEventQueue.IsEmpty Dim mySimEvent As New Offset(Of Integer)("SendControl", &H3110, True) Dim mySimEventParams As New Offset(Of Integer)("SendControl", &H3114, True) Dim myEvent As SimEvents myEventQueue.TryDequeue(myEvent) mySimEventParams.SetValue(myEvent.MouseID) mySimEvent.SetValue(myEvent.EventID) SimLogger.Trace("Sending Control {0} with parameter {1}", myEvent.EventID, myEvent.MouseID) FSUIPCConnection.Process("SendControl") FSUIPCConnection.DeleteGroup("SendControl") Thread.Sleep(1000) Loop 2023-08-29 22:38:55.7787 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 70481 with parameter 536870912 2023-08-29 22:38:56.7829 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 70482 with parameter 536870912 2023-08-29 22:39:10.7899 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 79873 with parameter 536870912 2023-08-29 22:39:11.8007 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 69873 with parameter 536870912 First two controls send EVT_CDU_L_A, and EVT_CDU_L_B. As expected, 1 second apart from each other an "A" and "B" character shows up on CDU-L. Second two controls send EVT_OH_ELEC_GND_TESTS_GUARD and EVT_OH_ELEC_GND_TESTS_SWITCH. It seems that the Guard opens the switch toggles, but then the guard closes again (and disables the switch). This is not how it performs on the aircraft, the guard should stay open. Tried with a few other switches with guards: Battery Guard / Battery Press. Works as expected. 2023-08-29 22:46:08.2810 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 79650 with parameter 536870912 2023-08-29 22:46:09.3245 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 69650 with parameter 536870912 2023-08-29 22:46:10.3910 TRACE FSInterfaces.PMDGB74x.PowerMonitor, Battery Disconnected. ELEC_Battery_SW: 0 2023-08-29 22:46:10.3910 TRACE FSInterfaces.PMDGB74x.PowerMonitor, BUS B Off. ELEC_StanbyPowerSw: 1, ELEC_Battery_Sw_ON: 0 EMER Lights Guard Switch. Works as expected. 2023-08-29 22:51:14.7136 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 79693 with parameter 536870912 2023-08-29 22:51:15.7592 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 69693 with parameter 536870912 Guess I will have to test and verify each and every single one, but from what I can see yes - the code works fine after swapping the two requests around. There still are some switches with guards though, that doesn't want to play ball.
  5. Hi, Tying to send two consecutive events to the PMDB74x. The events process, but the desired result in Sim is far from what I expect. Code - processes the events from a FIFO queue (EventID & MouseID is Integers) Private Shared ReadOnly mySimEvent As New Offset(Of Integer)("SendControl", &H3110, True) Private Shared ReadOnly mySimParams As New Offset(Of Integer)("SendControl", &H3114, True) Private Shared ReadOnly myEventQueue As New Concurrent.ConcurrentQueue(Of SimEvents) Private Structure SimEvents Public EventID As Integer Public MouseID As Integer End Structure <snip> Do Until myEventQueue.IsEmpty ' no other Process() call is made elsewhere when this loop is called Dim myEvent As SimEvents myEventQueue.TryDequeue(myEvent) mySimEvent.SetValue(myEvent.EventID) mySimParams.SetValue(myEvent.MouseID) SimLogger.Trace("Sending Control {0} with parameter {1}", myEvent.EventID, myEvent.MouseID) FSUIPCConnection.Process("SendControl") Thread.Sleep(1000) ' <- Time delay seems to be of no consequence Loop Debug Log: 2023-08-29 21:41:12.3958 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 79873 with parameter 536870912 2023-08-29 21:41:13.4351 TRACE FSInterfaces.FSServer.FSUIPCRunnerElapsed, Sending Control 69873 with parameter 536870912 Control 79873 (0x79873) is defined as EVT_OH_ELEC_GND_TESTS_GUARD in the PMDG_747QOTSII_SDK.h file (Mouse parameter is MOUSE_FLAG_LEFTSINGLE 0x20000000) Control 69873 (0x110F1) is defined as EVT_OH_ELEC_GND_TESTS_SWITCH in the PMDG_747QOTSII_SDK.h file (Mouse parameter is MOUSE_FLAG_LEFTSINGLE 0x20000000) I expect, the Guard to open on the switch, and the switch to be toggled. However, the Guard seems to open and then close again. I can call both of these controls independently (outside of the loop) successfully. Is there something that needs to happen here to 'reset' the Send Controls?
  6. Thanks John & Paul. Very insightful and useful feedback as always!
  7. Hi, Just two quick ones please.... 1) Is there a reason why WebSocketServer is not included in FSUIPC6? Is it supported (P3D, etc?) 2) When using WebSocketServer (latest FSUIPC7), if I bind the application to an IP address other than 127.0.0.1 (localhost) - it requires Windows Admin rights to run? Surely this doesn't seem correct? PS - would be nice to bind to multiple IPs, or listen on any/all IPs.
  8. PMDG has confirmed that this is an issue on their side. There is an issue in the SDK and they are isolating / fixing the problem. I would expect a hotfix to be released for the queen that will fix this, and (quite a few) other issues too.
  9. PMDG's looking at this - seems it is on their side. Thnx,
  10. Hi Pete, I had a look at the .h files of the SDK, and there's no difference between the old version, and the new version released yesterday. Using the exact same code however, the offsets seems to be completely off. I am not getting the desired results at all. I am specifically looking related to the FMC Annunciations, none of them work, and one seems to be tied to the parking brake?!? EXEC below, should be all 0. I am getting exactly the opposite of what is expected. It is more than likely a PMDG issue, but I thought I would just mention this. Perhaps you can 'easily' see whether things changed, or perhaps other members of the community can just post their experiences since the upgrade as well. From what I am seeing, it looks like the SDK has been horribly broken. Thnx Chris.
  11. Nevermind - found the issue. Simultaneous / duplicate process calls. it's sorted 🙂
  12. Hi Paul, Just a quick question - seeing some arb exceptions (group '0~~~GetSnapshot~~~' does not exist). Quick question - does getpositionsnapshot do a process() call through FSUIPC on it's own, or does the update only occur once I call FSUIPCConnection.Process()? I think there's too many process() calls being executed, so just trying to determine what I can / need to slow down. Thanks.
  13. Oh, and the exception occurs when: - Initialize Timer to fire every 10ms; - While True; Loop (just to ensure the timer fires) Every 10ms, we now call Open() and/or Process() via the timer Start, close, restart, the sim while the code is running. I *suspect*, either Open is executing, or Process is executing without the necessary variables in FSUIPCClient being initialized.
  14. Can't reproduce it now for some reason 🤯 Typical Murphy. I've added the necessary code for a full stack and will revert if it happens again. I think it may have been my PC though, but the exception should still be caught nonetheless. I do believe it is your exception, as the source is your DLL and ~SystemOffsets~ aren't my variable. I will revert back if / once it happens again and I have a full stack dump for you. FYI, this is the code, fired by an Timer with a 10ms trigger Private sub FSUIPCProcess(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) ' If we are not connected to the simulator, try to re-connect Try If SimConnected = False FSUIPCConnection.Open() If FSUIPCConnection.IsOpen SimConnected = True Else SimConnected = False Exit Sub End If Else FSUIPCConnection.Process Debug.Write("a") End If Catch ex As FSUIPCException If ex.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_NOFS ' Can not connect to FSUIPC or WideFS, not running? SimConnected = False ElseIf ex.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_OPEN ' We are apparently already connected SimConnected = True ElseIf ex.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_NOTOPEN Or ex.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_SENDMSG SimConnected = False Else Debug.WriteLine("EXCEPTION: " & ex.Message.ToString) Debug.WriteLine(" STACK: " & ex.StackTrace.ToString) End If Catch ex As Exception ' This is where the exception is caught Dim st As New StackTrace(ex, True) Debug.WriteLine("EXCEPTION: " & ex.Message.ToString) Debug.WriteLine(" STACK: " & st.ToString) End Try End sub
  15. Hi Paul, Just an FYI - Calling FSUIPCConnection.Open() there is an exception that you're not catching. Nothing major - just an FYI.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.