Replies: 1 comment
-
Hello, In our model, the CANFrame itself does not have a field containing the payload length. We use OMNeT++ encapsulation to ecap the payload inside the CANFrame. The length of the payload packet is set before encapsulation and the the CANFrame size can be updated accordingly. This is done in the line "payload_packet->setByteLength(dataFieldLength);" which you posted. I hope this answers your questions otherwise feel free to reply in this discussion. Regards |
Beta Was this translation helpful? Give feedback.
-
packet CanDataFrame{
string displayString;
unsigned int canID; // ID of the message
bool rtr; // true if remote-frame
double period; // Periodicy of the message
}
The above is the CanDataFrame ,on which field do i need to set the Payload information.
In initialFrameCreation("data", dataFrameIDsTokenizer, dataFramesPeriodicityTokenizer,
dataLengthDataFramesTokenizer, initialDataFrameOffsetTokenizer);
we are setting Payload_packet with the size but where are we setting the Payload value?
cPacket *payload_packet = new cPacket;
payload_packet->setTimestamp();
payload_packet->setByteLength(dataFieldLength);
can_msg->encapsulate(payload_packet);
I am refering to 8 bits Data or dataframe
DATA– Used to store up to 64 data bits of application data to be transmitted.
Beta Was this translation helpful? Give feedback.
All reactions