In addition to the above parameters, the SRM agent supports additional configuration variables. Each of the variables described in this section is both an OTcl class variable and an OTcl object's instance variable. Changing the class variable changes the default value for all agents that are created subsequently. Changing the instance variable of a particular agent only affects the values used by that agent. For example,
Agent/SRM set D1_ 2.0 # Changes the class variable; $srm set D1_ 2.0 # Changes D1_ for the particular $srm object only;
The default request and repair timer parameters [11] for each SRM agent are:
Agent/SRM set C1_ 2.0 # request parameters; Agent/SRM set C2_ 2.0 Agent/SRM set D1_ 1.0 # repair parameters; Agent/SRM set D2_ 1.0It is thus possible to trivially obtain two flavors of SRM agents based on whether the agents use probabilistic or deterministic suppression by using the following definitions:
Class Agent/SRM/Deterministic -superclass Agent/SRM Agent/SRM/Deterministic set C2_ 0.0 Agent/SRM/Deterministic set D2_ 0.0 Class Agent/SRM/Probabilistic -superclass Agent/SRM Agent/SRM/Probabilistic set C1_ 0.0 Agent/SRM/Probabilistic set D1_ 0.0In a later sectionSectionsec:extensions, we will discuss other ways of extending the SRM agent.
Timer related functions are handled by separate objects belonging to the class SRM. Timers are required for loss recovery and sending periodic session messages. There are loss recovery objects to send request and repair messages. The agent creates a separate request or repair object to handle each loss. In contrast, the agent only creates one session object to send periodic session messages. The default classes the express each of these functions are:
Agent/SRM set requestFunction_ "SRM/request" Agent/SRM set repairFunction_ "SRM/repair" Agent/SRM set sessionFunction_ "SRM/session" Agent/SRM set requestBackoffLimit_ 5 # parameter to requestFunction_; Agent/SRM set sessionDelay_ 1.0 # parameter to sessionFunction_;The instance procedures []requestFunction../ns-/srm.tclAgent/SRM::requestFunction, []repairFunction../ns-/srm.tclAgent/SRM::repairFunction, and []sessionFunction../ns-/srm.tclAgent/SRM::sessionFunction can be used to change the default function for individual agents. The last two lines are specific parameters used by the request and session objects. The following sectionSectionsec:architecture describes the implementation of theses objects in greater detail.
Tom Henderson 2014-12-17