Difference between revisions of "Extensions.DiagCom.SetParameterValueBySemantic"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''SetParameterValueBySemantic'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''SetParameterValueBySemantic'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | SetParameterValueBySemantic | Sets the value of a request parameter via a semantic attribute | [[Action]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[ComParameter related actions]] | [[Core.Actions.Throw.Exception.TypeMismatchException|TypeMismatchException]] <br/> [[Core.Actions.Throw.Exception.AmbiguousSemanticException|AmbiguousSemanticException]] <br/> [[Core.Actions.Throw.Exception.OutOfBoundsException|OutOfBoundsException]] | - }}
+
{{ClassificationActivity | SetParameterValueBySemantic | Sets a value to a '''<parameter>''' element with a specific semantic | [[Action]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[DiagService related actions]] | [[Core.DataTypes.ComplexDataType.TypeMismatchException|TypeMismatchException]] <br/> [[Extensions.DiagCom.AmbiguousSemanticException|AmbiguousSemanticException]] <br/> [[Core.DataTypes.ComplexDataType.OutOfBoundsException|OutOfBoundsException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.SetParameterValueByPath(ParameterContainer, StringTerm, Term);
+
DiagCom.SetParameterValueBySemantic(ParameterContainerTerm, StringTerm, Term);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''SetParameterValueBySemantic''' activity sets a request parameter "manually" to a specific value, see [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]. The parameter is used on a so-called semantic-attribute selected.
+
The '''SetParameterValueBySemantic''' activity sets a value to a '''<parameter>''' element with a specific semantic. This action is used in case the
{{Note|Is a prerequisite for the use of semantic attributes, that they through the diagnostic runtime system are supported and that they in the diagnostic database have been adjusted.}}
+
backend communication system provides the means to associate semantic metadata with parameters of diagnostic services. The value to be set is to be provided as an [[Core.DataTypes.SimpleDataType|OTX simple type]], an [[Core.DataTypes.ComplexDataType.ByteField|OTX bytefield]], [[Core.DataTypes.ComplexDataType.List|list]] or [[Core.DataTypes.ComplexDataType.Map|map]] or an OTX [[Extensions.Quantities.Quantity|Quantity]].
 +
 
 +
{{Note|The ability to assign a semantic value to a diagnostic service or service parameter allows applications working with diagnostic data to access functionality in a manner more abstract than directly pointing to specific names of services/parameters}}
 +
 
 +
{{Note|When using an ODX/MVCI based system it is mandatory to assign specific semantic attribute values to the parameters used by diagnostic services for implementing DDLID (Dynamically Defined Local Identifier) functionality, like the DDLID-POS semantic attribute that’s used for indicating the parameter that defines the position of a value in a dynamically created response}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The object that contains the parameter whose to be set value.}}
+
{{TableRowPropertie2| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The object that contains the parameter that shall be changed.}}
{{TableRowPropertie2| Semantic | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Semantics attribute.}}
+
{{TableRowPropertie1| Semantic | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | This element specifies the semantic of the parameter that shall be modified.}}
{{TableRowPropertie1| Value | - | [[Variable]] | - | [1] | Value of the corresponding type that is to be placed.}}
+
{{TableRowPropertie2| Value | - | [[Term]] | - | [1] | This element specifies the value that shall be set to the Parameter. Allowed input types are [[Core.DataTypes.SimpleDataType|OTX simple types]], [[Core.DataTypes.ComplexDataType.ByteField|OTX bytefields]], [[Core.DataTypes.ComplexDataType.List|lists]] and [[Core.DataTypes.ComplexDataType.Map|maps]] and [[Extensions.Quantities.Quantity|OTX quantities]].}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
DiagCom.DiagService DiagService1;
DiagCom.DiagService myDiagService;
+
DiagCom.ComChannel ComChannel1;
DiagCom.Request req;
+
DiagCom.Request Request1;
DiagCom.Parameter param;
+
 
 +
/// Flow
  
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", null, false);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
myDiagService = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentASAMODXFileIdent");
+
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentMeasuValue");
req = DiagCom.GetRequest(myDiagService);
+
Request1 = DiagCom.GetRequest(DiagService1);
param = DiagCom.GetParameterByPath(req, {"Param_RecorDataIdent"});
+
DiagCom.SetParameterValueBySemantic(Request1, "DATA-ID", "Response_On_Event");
DiagCom.SetParameterValueBySemantic(param, "Semantic", "Value");
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
 
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
[[Extensions.DiagCom.SetParameterValue|SetParameterValue]] <br/>
+
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
[[Extensions.DiagCom.SetPdu|SetPdu]]
+
[[Extensions.DiagCom.GetRequest|GetRequest]]

Revision as of 08:12, 11 October 2018

Classification

Name SetParameterValueBySemantic
Short Description Sets a value to a <parameter> element with a specific semantic
Class Action
Extension OTX DiagCom extension
Group DiagService related actions
Exceptions TypeMismatchException
AmbiguousSemanticException
OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

DiagCom.SetParameterValueBySemantic(ParameterContainerTerm, StringTerm, Term);

Description

The SetParameterValueBySemantic activity sets a value to a <parameter> element with a specific semantic. This action is used in case the backend communication system provides the means to associate semantic metadata with parameters of diagnostic services. The value to be set is to be provided as an OTX simple type, an OTX bytefield, list or map or an OTX Quantity.

Icons Note.png The ability to assign a semantic value to a diagnostic service or service parameter allows applications working with diagnostic data to access functionality in a manner more abstract than directly pointing to specific names of services/parameters
Icons Note.png When using an ODX/MVCI based system it is mandatory to assign specific semantic attribute values to the parameters used by diagnostic services for implementing DDLID (Dynamically Defined Local Identifier) functionality, like the DDLID-POS semantic attribute that’s used for indicating the parameter that defines the position of a value in a dynamically created response

Properties

Name Data Type Class Default Cardinality Description
ParameterContainer ParameterContainer Term - [1] The object that contains the parameter that shall be changed.
Semantic String Term - [1] This element specifies the semantic of the parameter that shall be modified.
Value - Term - [1] This element specifies the value that shall be set to the Parameter. Allowed input types are OTX simple types, OTX bytefields, lists and maps and OTX quantities.

OTL Examples

DiagCom.DiagService DiagService1;
DiagCom.ComChannel ComChannel1;
DiagCom.Request Request1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentMeasuValue");
Request1 = DiagCom.GetRequest(DiagService1);
DiagCom.SetParameterValueBySemantic(Request1, "DATA-ID", "Response_On_Event");

See also

GetComChannel
CreateDiagServiceByName
GetRequest