English subtitles

← Sequence concept cs348 unit7

Get Embed Code
1 Language

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

  1. A sequence is basically a predefined struct with a predefined tcm called body.
  2. This body tcm is empty and inside, you can define all your procedural code or
  3. synchronization code as you wish. So a normal tcm it will be automatically
  4. called when the sequence is generated. In addition to all of the normal code
  5. you can write in this body tcm, there is a new action called the Do action.
  6. This one you can only do in the body tcm of the sequence. The Do action allows
  7. you to generate another sequence. So, if you say do sequence, like in this
  8. example here, it actually generates this new sequence with all its fields, and
  9. then it calls the body function of that sequence. So, what you end up with is a
  10. hierarchical structure, which gets built up layer by layer. So, once you get to
  11. the Do statement, a new sequence is generated and its body is called. So far,
  12. so good but we still haven't got our packet, our traffic item. So, in addition
  13. to the ability to do a sequence, you can also do a packet. So, the packet is
  14. now called a sequence item, and if you use it in this two statement, what will
  15. happen is you generate all the fields hierarchically in the packet, and then
  16. you put the packet in a queue. This queue then is connected to your interface
  17. to your pkt_driver, and it pulls off whenever there is something available, it
  18. sends it to the device. So, what you now have is a synchronization mechanism
  19. with the body tcm and the sync statements, and the generation mechanisms so you
  20. can build your little traffic scenarios in a hierarchical fashion and control
  21. your traffic generation and synchronization very easily.