Skip to content

5. Events

Jim Reeves edited this page Mar 28, 2021 · 3 revisions

Events are raised to notify client code of a change.

The events within SimConnect are mostly similar to the events provided by the SimConnectHandler, however, the SimConnectHandler class simplifies them and provides enriched data, such as details on the actual SimVar that has been updated, instead of a pointer to lookup the details on the SimVar, or the status of the connection whenever SimConnect either connects or disconnects to MSFS2020.

  • EventHandler<bool> SimConnected - Invoked whenever SimConnect connects or disconnects to MSFS 2020 - Supplies True/False to indicate connection state
  • EventHandler<SimConnectVariableValue> SimData - Invoked when a new value is received for a SimVar - Supplies SimVar name, unit and value
  • EventHandler<IOException> SimError - Invoked when an error occurs - Supplies description and actual SimConnect error in Data property and each element
  • EventHandler<SimVarMessage> SimLog - Invoked throughout SimConnectHandler code to provide debug messages as code is executed

Clone this wiki locally