English subtitles

← Modeling a Packet cs348 unit2new

Get Embed Code
1 Language

Showing Revision 1 created 04/14/2013 by Cogi-Admin.

  1. In Unit 1, we learned how to model data. The data was a text message, and we
  2. send it into a smartphone. We're now transferring all of this knowledge we
  3. learned, and apply it to our packet so we can send it into our router. We just
  4. talked about all of the elements of our packet. In the header, we have a
  5. address and a length, we have data, and we have a parity. Now, it's time to
  6. model this packet in software. It's packet time. We're building a packet based
  7. out of four fields. The first is the header which has an address and a length
  8. field. We use type uint 2 and 6 bits respectively. Then, we're adding an array
  9. which is a list of byte for our payload, and we're ending it, with a parity
  10. byte. The syntax for the list is very simple. You have a FIELD_NAME. Then, in
  11. the brackets, you determine how big that will be, colon, and then list of, and
  12. then your data type. We have these fields down here. The header first, the
  13. address and length field. Then, you follow with the payload list, and then with
  14. the parity. Very straightforwad, go ahead and model this packet.