Extensions.DiagComPlus.GetComChannelState

From emotive
Jump to navigation Jump to search

Classification

Name GetComChannelState
Short Description An explicit value from set the status of a communication channel.
Class Term
Extension OTX DiagComPlus extension
Group DiagComPlus related terms
Exceptions UnknownTargetException
Checker Rules -
Standard Compliant Yes

OTL Syntax

ComChannelStateTerm DiagComPlus.GetComChannelState(ComChannelTerm comChannel);

Description

This term will set the status of a communication channel to an explicit value.

Icons Note.png The appropriate MVCI system operation is MCDLogicalLink::getState.

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
ComChannelStates An explicit value from set the status of a communication channel.

Properties

Name Data Type Class Default Cardinality Description
ComChannel ComChannel Term - [1..1] This element will reference the handle of the communication channel whose status will be returned.
Icons Note.png In case of an MVCI base system the four statuses are available for a logical link. For other base systems it should be possible to logically map the statuses to the existing ones.

OTL Examples

/// Local Declarations

DiagComPlus.ComChannelState ComChannelState1 = @ComChannelState:COMMUNICATION;
Exception Exception1;
DiagCom.ComChannel ComChannel1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);

try
{
	[#DiagMetaData , <#Data>
		<dmd:diagMetaData xmlns:dmd="http://iso.org/OTX/1.0.0/Auxiliaries/DiagMetaData">
		  <dmd:comChannelName value="LL_GatewUDS" />
		  <dmd:ecuVariantName value="EV_GatewLear_006" />
		</dmd:diagMetaData></#Data>]
	DiagComPlus.StartCommunication(ComChannel1);
	ComChannelState1 = DiagComPlus.GetComChannelState(ComChannel1);
	[#DiagMetaData , <#Data>
		<dmd:diagMetaData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dmd="http://iso.org/OTX/1.0.0/Auxiliaries/DiagMetaData">
		  <dmd:comChannelName value="LL_GatewUDS" />
		  <dmd:ecuVariantName value="EV_GatewLear_006" />
		</dmd:diagMetaData></#Data>]
	DiagComPlus.StopCommunication(ComChannel1);
}
catch (DiagCom.LossOfComException Exception1)
{
}

See also

ExecuteHexDiagServiceFunctional
StartCommunication
StopCommunication
CreateComChannel
GetComParameterList