Studio:Accessing the User Side of a Function Interface (API) from Studio

From STRIDE Wiki
Jump to navigation Jump to search

This note describes how to use a STRIDE Studio interface dialog as the User end of a function call. The interface dialog makes it possible to call the function's registered Owner in an interactive fashion. You can enter parameter values directly into the dialog, push a button to call the function, then inspect return values directly.

Opening the Dialog

To open the User dialog for an interface, first select the Interfaces pane within the Workspace window and navigate to the function you wish to call.

Context Menu Method

UserFunctionFromStudio1.jpg

To open the dialog via the context menu do the following:

  1. Right-click on the function label in the tree to bring up the context menu
  2. Select Open User Message from the menu


Hot Key Method

The dialog can also be opened using the keyboard, bypassing the context menu:

  1. Click on the function label in the tree to select the interface
  2. Type U (upper or lower case) on the keyboard

Dialog Contents

The User Interface dialog displays a source-level, user format representation of the function. All Item cells are initially populated with default values (chosen by STRIDE Studio). You can enter data directly into the input fields in the Item column. (You can enter a value in the Return Value Item cell, but here only the ParameterList data is marshaled to the function Owner.)

UserFunctionFromStudio2.jpg

Calling the Function

If the function has a currently registered Owner, then the Call toolbar button will be enabled. Pressing the button will call the function Owner with the currently-displayed ParameterList values. Upon return from the function, the ReturnValue Item cell will reflect the actual return value.