Extensions.DiagDataBrowsingPlus.GetDbParameterDisplayUnitAsString

From emotive
Jump to navigation Jump to search

Classification

Name GetDbParameterDisplayUnitAsString
Short Description Gets the display unit of the DbParameter
Class Term
Extension OTX DiagDataBrowsingPlus extension
Group DbParameter related terms
Exceptions InvalidTypeException
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm DiagDataBrowsingPlus.GetDbParameterDisplayUnitAsString(DbParameterTerm dbParameter);

Description

GetDbParameterDisplayUnitAsString returns the display unit information of the DbParameter as a string. If the parameter is not of simple Data Type or does not contain any unit information an empty string is returned. The unit is only available for parameters with simple Data Type.

If the parameter is not of simple Data Type A_UINT (8-64), A_INT (8-64), FLOAT (32,64), TEXTTABLE, BITFIELD, ASCIISTRING, UNICODE2STRING or BYTEFIELD, the InvalidTypeException exception will be thrown.

Icons Note.png The appropriate MVCI system operation is MCDDbParameter::getUnit

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
String Returns the display unit information of the DbParameter.

Properties

Name Data Type Class Default Cardinality Description
DbParameter DbParameter Term - [1..1] The element addresses the DbParameter (MCDDbParameter) which display unit shall be returned.

OTL Examples

/// Local Declarations

DiagCom.Result Result;
DiagCom.Response Response;
DiagCom.Parameter Parameter;
DiagDataBrowsingPlus.DbParameter DbParameter;
String MyString;

/// Flow

[#MetaData(RequestPdu), <#Data>22 2A 19</#Data>]
DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false), "DiagnServi_ReadDataByIdentMeasuValue"), {Param_RecorDataIdent = "stall current measurement value"}, {}, Result, NULL, false, false);
Response = DiagCom.GetFirstResponse(Result);
Parameter = DiagCom.GetParameterByPath(Response, {"Param_DataRecor", "Param_StallCurreMeasuValue", "Case_MeasuValue", "Param_Ruhes"});
DbParameter = DiagDataBrowsingPlus.GetParameterDbParameter(Parameter);
MyString = DiagDataBrowsingPlus.GetDbParameterDisplayUnitAsString(DbParameter);

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetFirstResponse
GetRequest
GetParameterByPath
GetParameterDbParameter