Difference between revisions of "OtfDeclarationSettings"
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Open Test Framework - Declaration Settings}}[[Category:OTF]] | {{DISPLAYTITLE:Open Test Framework - Declaration Settings}}[[Category:OTF]] | ||
==Introduction== | ==Introduction== | ||
− | With the "'''Declaration - Settings'''", you can view and configure the properties of a declaration (see the image below). To access the properties dialog box of a declaration, please right click on the corresponding declaration node in the [[OtfSolutionExplorer|Solution Explorer]] and select "'''Properties'''" menu entry, or just double click on the declaration node. | + | With the "'''Declaration - Settings'''", you can view and configure the properties of a declaration{{TooltipIcon2|i.e. a global declaration or a local declarations or a parameter}} (see the image below). To access the properties dialog box of a declaration, please right click on the corresponding declaration node in the [[OtfSolutionExplorer|Solution Explorer]] and select "'''Properties'''" menu entry, or just double click on the declaration node. |
− | The "'''Declaration - Settings'''" dialog box is a standard form used for the '''global declarations''', '''local declarations''' and '''parameters'''. Depending on the type of the declaration or the value type, special buttons are displayed to expand the dialog box e.g. | + | The "'''Declaration - Settings'''" dialog box is a standard form used for the '''global declarations''', '''local declarations''' and '''parameters'''. Depending on the type of the declaration or the value type (data type), special buttons are displayed to expand the dialog box e.g. the case of the procedure parameter of String data type or to open another dialog box e.g. in case value type of Quantity (see [[#Special cases|below]]). |
Line 17: | Line 17: | ||
* The "'''Type'''" combo box: | * The "'''Type'''" combo box: | ||
− | : Here you can set the | + | : Here you can set the data type of the declaration by selecting a type in the '''Type''' combo box. |
− | :: [[File:exclamation.png]]  If the declaration is | + | :: [[File:exclamation.png]]  If the declaration is referred (used) in anywhere, the selected type will be unchangable. |
* The "'''Default value'''" (or Initial value) text box/combo box: | * The "'''Default value'''" (or Initial value) text box/combo box: | ||
− | : Depending on the value type of the declaration, you can | + | : Depending on the value type of the declaration, you can enter the initial value in the '''Default value''' text box e.g. Integer type, or you can select an available value of the list in the combo box e.g. Encoding type. |
:: [[File:exclamation.png]]  This property is optional excepts that the constants must have the default value. | :: [[File:exclamation.png]]  This property is optional excepts that the constants must have the default value. | ||
Line 27: | Line 27: | ||
: Here you can set the description for the declaration. Hover the mouse over the declaration in the [[OtfSolutionExplorer|Solution Explorer]], you will see that description as a tooltip. The description is optional, you can skip it. | : Here you can set the description for the declaration. Hover the mouse over the declaration in the [[OtfSolutionExplorer|Solution Explorer]], you will see that description as a tooltip. The description is optional, you can skip it. | ||
− | * The "'''Visibility'''" radio buttons (only for global | + | * The "'''Visibility'''" radio buttons (only visible for [[Core.Declarations.GlobalDeclarations|global declarations]]): |
: Here you can set the Visibility attribute for the declaration. | : Here you can set the Visibility attribute for the declaration. | ||
Line 33: | Line 33: | ||
As mentioned above, in some cases there will be special buttons to expand the dialog box or to open another new dialog box: | As mentioned above, in some cases there will be special buttons to expand the dialog box or to open another new dialog box: | ||
− | ===Quantity or Unit | + | ===Quantity or Unit Data Type=== |
− | Normally, you can input the initial value directly for a declaration with Quantity or Unit value type e.g. @Quantity:12.5/"km/h"/2, but you can also use the supported dialog box for quantity (or unit) to create the initial value more easily (see the image below). When the | + | Normally, you can input the initial value directly for a declaration with Quantity or Unit value type e.g. @Quantity:12.5/"km/h"/2, but you can also use the supported dialog box for quantity (or unit) to create the initial value more easily (see the image below). When the data type of a declaration is the Quantity or the Unit, you will find the "''' ... '''" button on the right of the "'''Default value'''" combo box, which enables you to open the supported dialog box for the corresponding type. In the dialog box, you first have to select the available unit odx file referred by the project (see [[OtfProjectSettings#Quantities_settings|Quantity Settings]]), then you can select a unit value in the unit file, also remember to set the numeral value and the display precision for the declaration. |
Line 43: | Line 43: | ||
The parameters of a procedure signature or a procedure can contain the diagnostic metadata (or access path) in the following cases: | The parameters of a procedure signature or a procedure can contain the diagnostic metadata (or access path) in the following cases: | ||
− | :* | + | :* Parameter of String data type |
− | :* Parameters of ComChannel, DiagService or Parameter type | + | :* Parameters of ComChannel, DiagService or Parameter data type |
− | With parameters of the case above, there will be the "'''More/Less'''" button in the Parameter - Settings dialog box. If you click on this button, the Access Path section will be displayed to set an access path for the parameter. In the section, you can set the access path easily by selecting the corresponding node from the ODX tree | + | With parameters of the case above, there will be the "'''More/Less'''" button in the Parameter - Settings dialog box. If you click on this button, the Access Path section will be displayed to set an access path for the parameter. In the section, you can set the access path easily by selecting the corresponding node from the ODX tree view. To hide the section, click on the same button. |
− | {{Note|This access path just only supports ensuring the data consistency and selecting the short names from the database more easily, it can not replace the result from such activities as [[Extensions.DiagCom.GetComChannel|GetComChannel]], [[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]], | + | {{Note|This access path just only supports ensuring the data consistency and selecting the short names from the database more easily, it can not replace the result from such activities as [[Extensions.DiagCom.GetComChannel|GetComChannel]], [[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]], etc. at runtime. In case of In-Parameter of String type, you first have to select the radio button of the diagnostic element type (LogicalLink, EcuVariant, etc.) to determine the corresponding access path.}} |
Latest revision as of 07:12, 9 October 2018
Contents
Introduction
With the "Declaration - Settings", you can view and configure the properties of a declaration (see the image below). To access the properties dialog box of a declaration, please right click on the corresponding declaration node in the Solution Explorer and select "Properties" menu entry, or just double click on the declaration node.
The "Declaration - Settings" dialog box is a standard form used for the global declarations, local declarations and parameters. Depending on the type of the declaration or the value type (data type), special buttons are displayed to expand the dialog box e.g. the case of the procedure parameter of String data type or to open another dialog box e.g. in case value type of Quantity (see below).
![]() |
The Declaration - Settings dialog box allows for viewing and configuring the properties of a declaration |
Standard properties
The standard Declaration - Settings dialog box consists of the following controls:
- The "Name" text box:
- Here you can change the name of the declaration.
Note that the name should conform to the OTX Naming Conventions and the name must be unique among the declarations within the same scope. Also, the name of global declarations must be unique throughout all global identifiers defined in the same OTX document.
- The "Type" combo box:
- Here you can set the data type of the declaration by selecting a type in the Type combo box.
- The "Default value" (or Initial value) text box/combo box:
- Depending on the value type of the declaration, you can enter the initial value in the Default value text box e.g. Integer type, or you can select an available value of the list in the combo box e.g. Encoding type.
- The "Description" (or "Specification") area:
- Here you can set the description for the declaration. Hover the mouse over the declaration in the Solution Explorer, you will see that description as a tooltip. The description is optional, you can skip it.
- The "Visibility" radio buttons (only visible for global declarations):
- Here you can set the Visibility attribute for the declaration.
Special cases
As mentioned above, in some cases there will be special buttons to expand the dialog box or to open another new dialog box:
Quantity or Unit Data Type
Normally, you can input the initial value directly for a declaration with Quantity or Unit value type e.g. @Quantity:12.5/"km/h"/2, but you can also use the supported dialog box for quantity (or unit) to create the initial value more easily (see the image below). When the data type of a declaration is the Quantity or the Unit, you will find the " ... " button on the right of the "Default value" combo box, which enables you to open the supported dialog box for the corresponding type. In the dialog box, you first have to select the available unit odx file referred by the project (see Quantity Settings), then you can select a unit value in the unit file, also remember to set the numeral value and the display precision for the declaration.
![]() |
The Quantity/Unit dialog box allows for creating the default value of the declaration with Quantity or Unit type |
Parameters with diagnostic metadata
The parameters of a procedure signature or a procedure can contain the diagnostic metadata (or access path) in the following cases:
- Parameter of String data type
- Parameters of ComChannel, DiagService or Parameter data type
With parameters of the case above, there will be the "More/Less" button in the Parameter - Settings dialog box. If you click on this button, the Access Path section will be displayed to set an access path for the parameter. In the section, you can set the access path easily by selecting the corresponding node from the ODX tree view. To hide the section, click on the same button.
![]()
This access path just only supports ensuring the data consistency and selecting the short names from the database more easily, it can not replace the result from such activities as GetComChannel, CreateDiagServiceByName, etc. at runtime. In case of In-Parameter of String type, you first have to select the radio button of the diagnostic element type (LogicalLink, EcuVariant, etc.) to determine the corresponding access path.
![]() |
The Access Path section of the Procedure Parameter - Settings allows for setting the diagnostic metadata for the parameter |
See also