Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

triggering any of the failures via SimConnect

Featured Replies

I am getting back into programming a managed application with SimConnect and while I have read the SDK documentation and gone through the examples I am totally lost at what they claim it is possible to do.

 

The Events section lists about 14 failures including engine failures (one for each possible engine), pitot blockage, pitot static, brake failures and system failures (vacuum, electrical, hydraulic).

 

But there is no single example on how to actually trigger any of these failures or query the simulator about the current state of the failures.

 

// subscribe to Engine Failures
simconnect.MapClientEventToSimEvent(EVENTS.FAIL_ENGINE_1, "TOGGLE_ENGINE1_FAILURE")      simconnect.AddClientEventToNotificationGroup(NOTIFICATION_GROUP.BasicFailures, EVENTS.FAIL_ENGINE_1, false);

// set the group priority
simconnect.SetNotificationGroupPriority(NOTIFICATION_GROUP.BasicFailures, SimConnect.SIMCONNECT_GROUP_PRIORITY_HIGHEST);

 

and then I tried triggering with:

 

simconnect.TransmitClientEvent(00000001, EVENTS.FAIL_ENGINE_1, 1, NOTIFICATION_GROUP.BasicFailures, SIMCONNECT_EVENT_FLAG.DEFAULT);

 

and with

 

simconnect.SetSystemEventState(EVENTS.FAIL_ENGINE_1, SIMCONNECT_STATE.ON);

 

neither of them work.

E.G.
Freelance IT Consultant

www.PanamaVibes.com | www.lordofwingsPTY.com | www.coralys.com

@aviationweb

Emilio_G,

 

I'd suggest you to use the SetDataOnSimObject function to trigger a failure, like in the following example (it's Delphi but you'll easily grasp the idea):

 

first add it to data definition

SimConnect_AddToDataDefinition(hSimConnect, ord(DATDEF_SETENG1ONFIRE), 'ENG ON FIRE:1', '', SIMCONNECT_DATATYPE_INT32)

 

then call whenever you want it

SimConnect_SetDataOnSimObject(hSimConnect, ord(DATDEF_SETENG1ONFIRE), SIMCONNECT_OBJECT_ID_USER, 0, 0, 0, 0)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.