Extensions.DiagDataBrowsingPlus.GetDbParameterBitPos

From emotive
Jump to navigation Jump to search

Classification

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

OTL Syntax

IntegerTerm DiagDataBrowsingPlus.GetDbParameterBitPos(DbParameterTerm dbParameter);

Description

GetDbParameterBitPos returns the bit position of the parameter. The counting starts with 0. It return the Bit where the parameter in the byte starts. The byte should be determined by GetDbParameterODXBytePos.

If the parameter is not a float value (MCDDataType::FLOAT32 or MCDDataType::FLOAT64), the InvalidTypeException exception will be thrown.

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

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
Integer Returns the bit position of the parameter.

Properties

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

OTL Examples

/// Local Declarations

DiagCom.Result Result;
DiagCom.Response Response;
DiagCom.Parameter Parameter;
DiagDataBrowsingPlus.DbParameter DbParameter;
Integer MyInteger;

/// 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);
MyInteger = DiagDataBrowsingPlus.GetDbParameterBitPos(DbParameter);

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetFirstResponse
GetParameterByPath
GetParameterDbParameter