Classification
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