Difference between revisions of "Extensions.DiagCom.SetPdu"

From emotive
Jump to navigation Jump to search
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:DiagCom]]
+
{{DISPLAYTITLE:OTX '''SetPdu'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | SetPdu | Set the PDU within a request | [[Action]] | [[DiagCom|OTX DiagCom extension]] | [[ComParameter related actions]] | - | - }}
+
{{ClassificationActivity | SetPdu | Sets a specific '''ByteField''' to a '''Request''' instance | [[Action]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[DiagService related actions]] | - | - }}
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.SetPdu(Request, ByteFieldTerm);
+
DiagCom.SetPdu(RequestTerm request, ByteFieldTerm pdu);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
With the '''SetPdu''' activity a request can be passed directly without further processing a byte stream. 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 '''SetPdu''' activity is used to directly set a specific [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] to a [[Extensions.DiagCom.Request|Request]] instance, without using the symbolic level provided by the parameter mapping mechanism of the [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] action or the related DiagCom terms. In addition to '''SetPdu''', there exists a term [[Extensions.DiagCom.GetPdu|GetPdu]] which is used to retrieve the raw byte representation from a [[Extensions.DiagCom.Response|Response]] instance. '''SetPdu''' is modelled as an '''ActionRealisation''' because it modifies the object it is invoked on.
 +
 
 +
A PDU as understood by the OTX 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.
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Request | [[Request]] | [[Term]] | - | [1] | Request object.}}
+
{{TableRowPropertie1| Request | [[Extensions.DiagCom.Request|Request]] | [[Term]] | - | [1] | This element specifies the Request to which the value given by '''<pdu>''' will be assigned.}}
{{TableRowPropertie2| Pdu | [[ByteField]] | [[Term]] | - | [1] | PDU (z.B.: "18 00 FF FF").}}
+
{{TableRowPropertie2| Pdu | [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | [[Term]] | - | [1] | The '''ByteField''' which will be written to the '''Request'''.}}
 
|}
 
|}
  
 
== 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 myDiagService;
+
 
DiagCom.Request req;
+
DiagCom.Request Request1;
 +
DiagCom.ComChannel ComChannel1;
 +
DiagCom.DiagService DiagService1;
 +
 
 +
/// Flow
  
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", null, false);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);
myDiagService = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentASAMODXFileIdent");
+
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_TransData");
req = DiagCom.GetRequest(myDiagService);
+
Request1 = DiagCom.GetRequest(DiagService1);
DiagCom.SetPdu(req, &1800FF);
+
DiagCom.SetPdu(Request1, &191040226D6E);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[GetComChannel]] <br/>
+
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
[[SetParameterValue]] <br/>
+
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
[[SetParameterValueBySemantic]]
+
[[Extensions.DiagCom.GetRequest|GetRequest]]<br/>
 +
[[Extensions.DiagCom.GetPdu|GetPdu]]

Latest revision as of 10:04, 12 September 2019

Classification

Name SetPdu
Short Description Sets a specific ByteField to a Request instance
Class Action
Extension OTX DiagCom extension
Group DiagService related actions
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

DiagCom.SetPdu(RequestTerm request, ByteFieldTerm pdu);

Description

The SetPdu activity is used to directly set a specific ByteField to a Request instance, without using the symbolic level provided by the parameter mapping mechanism of the ExecuteDiagService action or the related DiagCom terms. In addition to SetPdu, there exists a term GetPdu which is used to retrieve the raw byte representation from a Response instance. SetPdu is modelled as an ActionRealisation because it modifies the object it is invoked on.

A PDU as understood by the OTX 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.

Properties

Name Data Type Class Default Cardinality Description
Request Request Term - [1] This element specifies the Request to which the value given by <pdu> will be assigned.
Pdu ByteField Term - [1] The ByteField which will be written to the Request.

OTL Examples

/// Local Declarations

DiagCom.Request Request1;
DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_TransData");
Request1 = DiagCom.GetRequest(DiagService1);
DiagCom.SetPdu(Request1, &191040226D6E);

See also

GetComChannel
CreateDiagServiceByName
GetRequest
GetPdu