FLOW API

The functions here are designed to warn add-on packages about the different states of the simulation flow and the potential FLT files that are loaded. The Flow API is a "global" API that is mainly used to deal with Back On Track events, and it is available across the following platforms:

NOTE: Even if SimConnect is accessible in WebAssembly, we strongly advise you to use the functions listed below rather than the ones provided by SimConnect.

 

You can find a sample project to use as a reference when using the Flow API here:

 

There are also debugging tools available in DevMode which can be used to help debug Flow Events and Communication API events, which are described on the following page:

 

 

Functions

The following functions are available for the Flow API:

 

Function Description
fsFlowRegister Register a callback which will receive flow events.
fsFlowUnregister Unregister a previously registered callback.
fsFlowUnregisterAll Unregister all previously registered callbacks.

 

 

Enums/Structs

The enums and structs available for use with the Flow API are:

 

Function Description Type
FsFlowEvent This enum is used to specified the type of the flow event. Enum

 

 

Typedefs

When using the functions listed above, you'll need to also have the following type definition, as it will be used as return values or to create callbacks by many of the functions. The typedef is:

 

  • fsFlowWasmCallback

    This is the type that needs to be used for callbacks. The buf parameter has been allocated in the WASM memory and will be freed after the call of this callback. Do not keep this pointer, make a copy of its contents if needed.

    typedef void (*fsFlowWasmCallback)(
        FsFlowEvent event,
        const char* buf,
        unsigned int bufSize,
        void* ctx
        )