Extensions.DiagCom.GetParameterByPath
Contents
Classification
Name | GetParameterByPath |
Short Description | Returns a parameter by its path |
Class | Term |
Extension | OTX DiagCom extension |
Group | Parameter related terms |
Exceptions | UnknownTargetException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
ParameterTerm DiagCom.GetParameterByPath(ParameterContainerTerm parameterContainer, {Path[ ] path});
Description
The GetParameterByPath termaccepts a ParameterContainerTerm and a Path to the parameter to be retrieved. It returns the parameter that is pointed to within the parameter container by the Path definition. 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. This term operates on the assumption that parameter names are unique within one hierarchy level of the parameter structure.
In OTX a path (Path) is used to access complex data structures. It consists of a series of StepByName and StepByIndex elements with which you can navigate into the structure. Each step assumes an hierarchical level deeper into the structure. StepByName addresses an element of the structure over its name (eg: the key in a list) and StepByIndex addressed a ELement via its index (eg index in a list). In the following figure, this is shown as an example. To get to the marked request or response parameters "Param22" The specified path must be entered:
Return Value
The Term returns the value, see table below.
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. |
Path | Path | - | - | [1] | The path element specifies the path to the desired parameter. |
OTL Examples
/// Local Declarations
DiagCom.Request Request1;
DiagCom.Parameter Parameter1;
DiagCom.ComChannel ComChannel1;
/// Flow
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
Request1 = DiagCom.GetRequest(DiagCom.CreateDiagServiceByName(ComChannel1, "SinglJob_FlashProgr"));
Parameter1 = DiagCom.GetParameterByPath(Request1, {"IPA_STminHandl", "Param_STminHandl", "Param_STminUpperLimit"});
See also
GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
GetRequest
ExecuteDiagService
GetFirstResponse
GetAllResponses