defPrototype: Defines a new prototype¶
The defPrototype can be used to define a new prototype that can be reused as is, or customised through a set of parameters.
Syntax¶
defPrototype(name, description)
where:
- name is the name assigned to the prototype
- description is a short one-liner about what the prototype does.
Usage¶
1 defPrototype("aggressivePing") { |proto|
2 proto.name = "aggressivePing"
3 proto.description = "A node that flood packets to a destination to quickly determine packet drop rates"
For more examples, see:
- sender.rb, which uses the test:proto:sender2 prototype
- receiver.rb, which uses the test:proto:receiver2 prototype
- How to run an application using Prototypes