Difference between revisions of "Extensions.DiagCom.GetParameterBySemantic"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''GetParameterBySemantic'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''GetParameterBySemantic'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetParameterBySemantic | Returns a parameter whose semantic attribute | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Parameter related terms]] | [[Core.Actions.Throw.Exception.AmbiguousSemanticException|AmbiguousSemanticException]] | - }}
+
{{ClassificationActivity | GetParameterBySemantic | Gets the parameter from a '''ParameterContainer''' and the semantic value | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Parameter related terms]] | [[Extensions.DiagCom.AmbiguousSemanticException|AmbiguousSemanticException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ParameterTerm = DiagCom.GetParameterBySemantic(ParameterContainer, StringTerm);
+
ParameterTerm = DiagCom.GetParameterBySemantic(ParameterContainerTerm, StringTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''GetParameterBySemantic''' term is from a container parameters to the corresponding parameter. The parameter is a [[Semantic Attribute]] selected.
+
The '''GetParameterBySemantic''' term accepts a '''ParameterContainerTerm''' and the semantic value of the parameter to be retrieved. It can return simple type or complex type parameters, depending on the parameter structure of the diagnostic service definition of the underlying communication system and the specific parameter that is being retrieved.
  
{{TermReturnValue| [[Extensions.DiagCom.Parameter|Parameter]] | Parameter object.}}
+
{{Note|In case a MVCI/ODX system is used the semantic value is equivalent to the semantic attribute of the corresponding '''MCDParameter''' object.}}
 +
 
 +
{{TermReturnValue| [[Extensions.DiagCom.Parameter|Parameter]] |The parameter is retrieved.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | Container, which is read out from the parameter.}}
+
{{TableRowPropertie1| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The container from which the '''Parameter''' shall be retrieved.}}
{{TableRowPropertie2| Semantic | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | "" | [1] | Semantic attribute to classify the diagnostic services (eg: "DEFAULT FAULTREAD" or "IDENTIFICATION").}}
+
{{TableRowPropertie2| Semantic | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The semantic attribute of the '''Parameter''' which shall be returned.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
DiagCom.Request Request1;
 
DiagCom.Parameter Parameter1;
 
DiagCom.Parameter Parameter1;
DiagCom.DiagService DiagService1;
 
 
DiagCom.ComChannel ComChannel1;
 
DiagCom.ComChannel ComChannel1;
  
ComChannel1 = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
+
/// Flow
DiagService1 = DiagCom.CreateDiagServiceBySemantic(ComChannel1, "DEFAULT-FAULT-READ");
+
 
Parameter1 = DiagCom.GetParameterBySemantic(DiagCom.GetRequest(DiagService1), "SERVICE-ID");
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
 +
Request1 = DiagCom.GetRequest(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentBasicSettiStatu"));
 +
Parameter1 = DiagCom.GetParameterBySemantic(Request1, "SERVICE-ID");
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[Extensions.DiagCom.GetParameterByPath|GetParameterByPath]] <br/>
+
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
[[Extensions.DiagCom.GetParameterName|GetParameterName]] <br/>
+
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
[[Extensions.DiagCom.GetParameterSemantic|GetParameterSemantic]] <br/>
+
[[Extensions.DiagCom.CreateDiagServiceBySemantic|CreateDiagServiceBySemantic]] <br/>
[[Extensions.DiagCom.GetParameterTextId|GetParameterTextId]] <br/>
+
[[Extensions.DiagCom.GetRequest|GetRequest]] <br/>
[[Extensions.DiagCom.GetParameterAsList|GetParameterAsList]] <br/>
+
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] <br/>
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]
+
[[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]] <br/>
 +
[[Extensions.DiagCom.GetAllResponses|GetAllResponses]] <br/>

Revision as of 10:21, 12 October 2018

Classification

Name GetParameterBySemantic
Short Description Gets the parameter from a ParameterContainer and the semantic value
Class Term
Extension OTX DiagCom extension
Group Parameter related terms
Exceptions AmbiguousSemanticException
Checker Rules -
Standard Compliant Yes

OTL Syntax

ParameterTerm = DiagCom.GetParameterBySemantic(ParameterContainerTerm, StringTerm);

Description

The GetParameterBySemantic term accepts a ParameterContainerTerm and the semantic value of the parameter to be retrieved. It can return simple type or complex type parameters, depending on the parameter structure of the diagnostic service definition of the underlying communication system and the specific parameter that is being retrieved.

Icons Note.png In case a MVCI/ODX system is used the semantic value is equivalent to the semantic attribute of the corresponding MCDParameter object.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Parameter The parameter is retrieved.

Properties

Name Data Type Class Default Cardinality Description
ParameterContainer ParameterContainer Term - [1] The container from which the Parameter shall be retrieved.
Semantic String Term - [1] The semantic attribute of the Parameter which shall be returned.

OTL Examples

DiagCom.Request Request1;
DiagCom.Parameter Parameter1;
DiagCom.ComChannel ComChannel1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
Request1 = DiagCom.GetRequest(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentBasicSettiStatu"));
Parameter1 = DiagCom.GetParameterBySemantic(Request1, "SERVICE-ID");

See also

GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
GetRequest
ExecuteDiagService
GetFirstResponse
GetAllResponses