BYTE rawReq[7] = {
0x0E, 0x80, // source address (tester)
0x10, 0x00, // target address (ECU)
0x22, 0x01, 0x05 // diagnostics service Read Data By Identifier
};
// Initialize the PDU combination, i.e. drop previous combination
DoIP_CreatePDUCombination();
// Add diagnostics message PDUs, changing the target address for each PDU
DoIP_AddCombinedPDU( 0x8001, rawReq, 7);
rawReq[3] = 0x01;
DoIP_AddCombinedPDU( 0x8001, rawReq, 7);
rawReq[3] = 0x02;
DoIP_AddCombinedPDU( 0x8001, rawReq, 7);
rawReq[3] = 0x03;
DoIP_AddCombinedPDU( 0x8001, rawReq, 7);
// Send the PDU combination. On Ethernet all four PDUs will be put into the
// same frame and arrive together at the DoIP gateway
DoIP_SendPDUCombination();