Difference between revisions of "Extensions.DiagCom.GetPdu"

From emotive
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''GetPdu'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''GetPdu'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetPdu | Byte stream of a request or a response | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Request related terms]] | - | - }}
+
{{ClassificationActivity | GetPdu | Byte stream of a request or a response | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Request related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ByteFieldTerm = DiagCom.GetPdu(RequestTerm);
+
ByteFieldTerm DiagCom.GetPdu(MessageTerm message);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''GetPdu''' term returns the byte stream of a request or a response. The byte stream is referred to as PDU (Protocol Data Unit). The PDU contains the entire block starting with the service identifier (SID), but without header and checksum.
+
The '''GetPdu''' term returns the raw byte stream data represented by a [[Extensions.DiagCom.Request|Request]] or a [[Extensions.DiagCom.Response|Response]] as seen on the physical layer. The '''GetPdu''' term is derived from '''ByteFieldTerm'''. A possible use case for retrieving raw communication data could be to implement bus tracing functionality. The corresponding opposite operation to the '''GetPdu''' term is provided by the [[Extensions.DiagCom.SetPdu|SetPdu]] action.
  
{{TermReturnValue| [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | Request of diagnostic services.}}
+
A PDU as understood by the DiagCom extension comprises the complete payload of a message including the service identifier and any other request parameters. It does not include header or checksum bytes from underlying protocol layers.
 +
 
 +
{{TermReturnValue| [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | The raw byte stream data represented by a [[Extensions.DiagCom.Request|Request]] or a [[Extensions.DiagCom.Response|Response]]}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Message | [[Extensions.DiagCom.Message|Message]] | [[Term]] | - | [1] | [[Extensions.DiagCom.Request|Request]] or [[Extensions.DiagCom.Response|Response]].}}
+
{{TableRowPropertie2| Message | [[Extensions.DiagCom.Message|Message]] | [[Term]] | - | [1] | The '''Message''' (e.g. '''Request''' or '''Response''') which is to be returned in '''ByteField''' form.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
/// Local Declarations
DiagCom.DiagService DiagService1;
+
 
 +
ByteField ByteField1;
 
DiagCom.Request Request1;
 
DiagCom.Request Request1;
ByteField ByteField1;
+
DiagCom.ComChannel ComChannel1;
 +
 
 +
/// Flow
  
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", null, false);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentActuaTestStatu");
+
Request1 = DiagCom.GetRequest(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ClearDiagnInfor"));
DiagCom.ExecuteDiagService(DiagService1, {}, {}, false, false);
 
Request1 = DiagCom.GetRequest(DiagService1);
 
 
ByteField1 = DiagCom.GetPdu(Request1);
 
ByteField1 = DiagCom.GetPdu(Request1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
 +
[[Extensions.DiagCom.GetComChannel|GetComChannel]]<br/>
 +
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]]<br/>
 +
[[Extensions.DiagCom.CreateDiagServiceBySemantic|CreateDiagServiceBySemantic]]<br/>
 
[[Extensions.DiagCom.GetRequest|GetRequest]]
 
[[Extensions.DiagCom.GetRequest|GetRequest]]

Latest revision as of 09:35, 1 November 2018

Classification

Name GetPdu
Short Description Byte stream of a request or a response
Class Term
Extension OTX DiagCom extension
Group Request related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

ByteFieldTerm DiagCom.GetPdu(MessageTerm message);

Description

The GetPdu term returns the raw byte stream data represented by a Request or a Response as seen on the physical layer. The GetPdu term is derived from ByteFieldTerm. A possible use case for retrieving raw communication data could be to implement bus tracing functionality. The corresponding opposite operation to the GetPdu term is provided by the SetPdu action.

A PDU as understood by the DiagCom extension comprises the complete payload of a message including the service identifier and any other request parameters. It does not include header or checksum bytes from underlying protocol layers.

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
ByteField The raw byte stream data represented by a Request or a Response

Properties

Name Data Type Class Default Cardinality Description
Message Message Term - [1] The Message (e.g. Request or Response) which is to be returned in ByteField form.

OTL Examples

/// Local Declarations

ByteField ByteField1;
DiagCom.Request Request1;
DiagCom.ComChannel ComChannel1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
Request1 = DiagCom.GetRequest(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ClearDiagnInfor"));
ByteField1 = DiagCom.GetPdu(Request1);

See also

GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
GetRequest