Laerdal.com  •  MySimCenter.com


Welcome to Simulation User Network Sign in | Join | Help
in Search
  Learn more about SimStore

5 ways to read and/or write to/from a LLEAP simulator using the SDK

Last post 03-16-2016, 3:13 PM by Dag Sanna. 0 replies.
Sort Posts: Previous Next
  •  03-16-2016, 3:13 PM 5999

    5 ways to read and/or write to/from a LLEAP simulator using the SDK

    This post describes 5 ways to communicate with a Laerdal Patient Simulator. The purpose is to help developers to decide the best method(s) for their needs.

    1 Remote Procedure Calls (RPC)
    The fundamentals behind all communication depends on the RPC available through LaerdalSimulatorAPI.dll. All the simulator functions can be accessed through the “IManikin” interface class. You need to use these functions in order to discover, connect, retrieve data, subscribe on data, change data and disconnect.
    See the test and demo applications in the SDK for examples on how to use the functions. Also, documentation about the functions and their arguments will show up in Visual Studio Intellisense.

    2 Parameters
    Parameters are used internally in the simulator as well as for communication with client applications such as LLEAP instructor application, Laerdal patient Monitor and any SDK application that may be connected. The following types exists:
    - ModelString, ModelInteger, ModelDouble, ModelEnum
    - AppValue: template type that can be string/int/bool/double
    - AppTimeList: essentially an array of int
    - AppEvent
    - AppEventBool: Event carrying a bool value
    - AppEnum

    Parameters typically carry the following information:
    - Session and system data
    - Session controls (start/pause etc)
    - Patient responses and controls
    - Patient data as configured in the scenario
    - Vital signs, alarms and contro| signals that is related to the patient Monitor

    Additionally there are special parameters that are used to implement other types of communication channels and features such as:
    - Parameters used by unit test
    - Parameters to carry events information – see section 3 below.
    - Parameters to carry session log information – see section 4 below.
    - Parameters used to carry information about user defined variables – see section 5 below.

    Parameters are essentially program variables that can be subscribed to by other SW components. When a parameter subscription is established, that parameter can be used as if it is a normal variable. You can evaluate its content and assign new values to it. The parameter will make sure to stay up to date and send any changes you apply to other components that use the same parameter. Parameters declarations are hardcoded in the simulator. The SDK is not allowed to declare new parameters, only to subscribe/read/write on existing parameters. Parameters may have read-only or read/write access.
    Parameters are established and transferred though the use of functions. See SDKTest::Parameters.cs and SDKTest::ParameterTypes.cs for examples on how to use parameters.
    Please compile and start the WinFormsDemo SDK demo project in order to see a full list of parameters names available to the SDK.

    3 Events
    Events are defined in the scenario (using SimDesigner). The scenario author can add standard events from the Laerdal Events Library or create his own events. The following types exists:
    - NormalEvent
    - Text
    - Integer
    - Decimal
    - Boolean
    - Enum.
    A special case is the composite type that consist of sub-events. Events can be read and written by scenario, simulator, and instructor (LLEAP). The SDK enables you to:
    - Retrieve a list of available events
    - Retrieve information about each event
    - Monitor events status
    - Trigger events
    See SDKTest::Events.cs and SDKTest::EventsView.cs for examples on how to use events.

    4 Session log
    The session log is written to by scenario, simulator and instructor (IA) and will end up in an xml file. After simulation, the log file is transferred to the debriefing application. The simulator adds entries to the log every time an Event change. The log also contains other information, such as instructor comments, patient responses and more. The SDK may:
    - Add log entries
    - Listen for changes or retrieve the entire log
    See SDKTest::Session. ReloadSessionLog() and AddComment() methods for examples on how to use the session log.

    5 User defined variables
    User defined variables are defined, read and written to by the scenario. The scenario author is may create these variables and use them to contro| the logical flow of the scenario. Some user variables are added automatically when a scenario is
    - Timer
    - Text
    - Integer
    - Decimal
    - Boolean
    - Enum (supported from version 5.5.0)
    The SDK enables you to:
    - Retrieve information about user variables
    - Subscribe to a variable
    - Read a variable
    - Write to a variable
    See SDKTest::UserDefinedVariables.cs for examples on how to use user defined variables.


    Dag Sanna
    Laerdal Medical AS
View as RSS news feed in XML