How does the Raw Ethernet frame looks like w.r.t xpc target example "Real Time Transmit and Receive over Ethernet"?
3 views (last 30 days)
Show older comments
I am testing the "Real Time Transmit and Receive over Ethernet" Example with its dedicated demo files 'xpcEnetDemo1Tx.mdl' and 'xpcEnetDemo1Rx.mdl'.
Host PC1: notebook installed with Matlab 2012b, xPC Target 5.3 version(supported by R2012b)
Target PC1: Industrial PC --> Boot Disk was performed successfully.
At first, i performed the Host to Target Communication and Model based Ethernet Communication successfully with respect to Host PC1 and Target PC1.
The demo file 'xpcEnetDemo1Tx.mdl' was executed on the Target PC1 to transmit the signals as Ethernet Packets.
Then, i looked into the block "Create Ethernet Packet" and try to understand the representation of the Raw Ethernet frame?
From the implementation of "Create Ethernet Packet" block, the Raw Ethernet frame representation is in the following way:
(6 octets) (6 octets) (2 octets) (16 octets)
| Destination MAC | Source MAC | EtherType | Packet Payload |
Address Address
Is the above an accurate representation of the Raw Ethernet frame with respect to the demo file 'xpcEnetDemo1Tx.mdl'?
Does the packet payload in turn contain headers for other protocols(for e.g., addressing protocol, internet protocol, TCP protocol, etc.) carried in the Raw Ethernet frame?
If anyone of you had investigated this particular detail, please give me your feedback!
0 Comments
Accepted Answer
Suneesh
on 19 Feb 2014
Edited: Suneesh
on 19 Feb 2014
Your understanding is accurate. The Ethertype in the example is the length of the data packet. this is because the parameter 'EtherType' in block 'Create Ethernet packet' is set to '0' which is used to indicate that the EtherType field should be set to the length of data. This is as per IEEE 802.3. The Raw Ethernet example does not contain ARP, IP etc.
2 Comments
Suneesh
on 20 Feb 2014
Edited: Suneesh
on 20 Feb 2014
It is not fruitful to view the signals at the output port of 'EthernetRx'. The output of this block is of type UINT32. These are just pointers to the ethernet packets captured by the hardware and needs to be passed only to the 'Ethernet Extract Packet'
More Answers (0)
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!