"copy data from CAN Chanel 1 and send that data in CAN chanel 2 using CAPL". Hi all, I am at Starting level of CAPL programming.. i faced this question in my interview , could you please help in this?
variables
{
message output_msg_name output_msg_obj;
int i;
}
on message CAN1.input_msg_name
{
input_msg_name in_msg_obj;
in_msg_obj = this;
output_msg_obj.dlc = in_msg_obj.dlc; // populate the dlc field for the output message
output_msg_obj.CAN = 2; // Assign CAN Channel to the Output message
for(i = 0; i< in_msg_obj.dlc ; i++)
{
output_msg_obj.byte[i] = in_msg_obj.byte[i]; // Copy the Data in the input message received.
}
output(output_msg_obj);
}