Difference between revisions of "Extensions.DiagCom.SetPdu"
Jump to navigation
Jump to search
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:DiagCom]] | + | {{DISPLAYTITLE:OTX '''SetPdu'''}}[[Category:DiagCom]] |
== Classification == | == Classification == | ||
− | {{ClassificationActivity | SetPdu | | + | {{ClassificationActivity | SetPdu | Sets a specific '''ByteField''' to a '''Request''' instance | [[Action]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[DiagService related actions]] | - | - }} |
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | SetPdu( | + | DiagCom.SetPdu(RequestTerm request, ByteFieldTerm pdu); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | + | 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 | + | {{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] | | + | {{TableRowPropertie2| Pdu | [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | [[Term]] | - | [1] | The '''ByteField''' which will be written to the '''Request'''.}} |
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | ComChannel | + | /// Local Declarations |
− | + | ||
+ | DiagCom.Request Request1; | ||
+ | DiagCom.ComChannel ComChannel1; | ||
+ | DiagCom.DiagService DiagService1; | ||
+ | |||
+ | /// Flow | ||
− | SetPdu( | + | ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false); |
+ | DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_TransData"); | ||
+ | Request1 = DiagCom.GetRequest(DiagService1); | ||
+ | DiagCom.SetPdu(Request1, &191040226D6E); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[GetComChannel]] <br/> | + | [[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/> |
− | [[ | + | [[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/> |
− | [[ | + | [[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);