i have implemented simple TDMA. now i want to make it dynamic with respect to no of nodes. as i enter it should automatically assign slots to each node. right now i have to enter slots in .ini file manually. example is as shown: Manual Procedure:
However, now i want to change it wrt noHost. how can i apply loop in ini file for this. can anyone help? i will be highly obliged. |
**.host[*].slotTime = index * 0.1
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.
You can use the special value index to achieve this, for example:**.host[*].slotTime = index * 0.1
See the corresponding manual section: https://omnetpp.org/doc/omnetpp/manual/#sec:ned-lang:expressionsAttila
2017-09-13 15:35 GMT+02:00 Atif Shahzad <shahzad...@gmail.com>:
i have implemented simple TDMA. now i want to make it dynamic with respect to no of nodes. as i enter it should automatically assign slots to each node. right now i have to enter slots in .ini file manually. example is as shown: Manual Procedure:
**.noHost = 10 **.host[0].slotTime = 0.0 **.host[1].slotTime = 0.1 **.host[2].slotTime = 0.2 **.host[3].slotTime = 0.3 **.host[4].slotTime = 0.4 **.host[5].slotTime = 0.5 **.host[6].slotTime = 0.6 **.host[7].slotTime = 0.7 **.host[8].slotTime = 0.8 **.host[9].slotTime = 0.9
However, now i want to change it wrt noHost. how can i apply loop in ini file for this. can anyone help? i will be highly obliged.
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.