Extensions.DiagCom.GetComParameterValueAsFloat

From emotive
Revision as of 11:01, 23 October 2018 by Hb (talk | contribs)
Jump to navigation Jump to search

Classification

Name GetComParameterValueAsFloat
Short Description Gets the current value of a Float communication parameter
Class Term
Extension OTX DiagCom extension
Group ComParam related terms
Exceptions UnknownTargetException
TypeMismatchException
Checker Rules -
Standard Compliant Yes

OTL Syntax

/// Local Declarations
Float FloatVariable;
/// Flow
FloatVariable = DiagCom.GetComParameterValueAsFloat(ComChannelTerm, StringTerm);

Description

The GetComParameterValueAsFloat term comprises the ChannelAndParameterName attribute group and shall return the current value of a float type communication parameter. If the communication parameter has not been previously modified by the SetComParameter action, the default parameter value shall be returned.

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
Float The current value of a Float communication parameter.

Properties

Name Data Type Class Default Cardinality Description
ComChannel ComChannel Term - [1] The ComChannelTerm specifies the ComChannel which shall be queried.
ComParameterName String Term - [1] The otx:StringTerm specifies the name of a communication parameter.

OTL Examples

/// Local Declarations

DiagCom.ComChannel ComChannel1;
Exception Handle1;
Float Float1;

/// Flow

try
{
	ComChannel1 = DiagCom.GetComChannel("LL_CentrElectUDS", "EV_BCMCONTI_009", false);
	[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
	DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu"), {}, {}, NULL, NULL, false, false);
	Float1 = DiagCom.GetComParameterValueAsFloat(ComChannel1, "CP_TesterPresentTime");
}
catch (TypeMismatchException Handle1)
{			
}

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetComplexComParameter
SetComplexComParameter
GetComParameterValueAsBoolean
GetComParameterValueAsString
GetComParameterValueAsInteger
GetComParameterValueAsByteField
GetComParameterValueAsQuantity