I have written a basic program to send a UDS message in CAPL, But I don't know how to take the response inside the testcase function.
Below is the code snippet
includes
{
}
variables
{
message 0x639 read;
}
void maintest()
{
tc1();
}
testCase tc1()
{
read.dlc=0x08;
read.byte(0)=0X02;
read.byte(1)=0x10;
read.byte(2)=0x03;
output(read);
testStepPass("OK");
}
As mentioned in the previous comments, it is recommended to use the Diagnostic Features.
If you wish to use raw frames, then there is a function for waiting for the response message.
The
res_msg
will be having the byte values of the response.You can access it by
res_msg.byte(0)
.