Riccardo Lancellotti
unread,Nov 30, 2022, 12:44:31 PM11/30/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to omn...@googlegroups.com
Hi,
I am really excited by the object parameters introduced in version 6.
The documentation on the NED part is well written and I was able to
write out a .ned definition of a micro service chain workload
generator. The definition of a chain composed by a 2 microservices
should be something like:
volatile object chain=default([{serviceTime: exponential(1s),
nextNode: [{id: 1, weight: 1}],
abortProbability=0.05,
},{serviceTime: exponential(1s),
nextNode: [{id: -1, weight: 1}],
abortProbability=0,
}]);
No the tricky part seems to handle the C++ side. The documentation on
this part seems outdated (the manual mentions that objects are not
supported and I would use a string tokenizer, which seems dating back
to omnet 4 or 5).
Perhaps I should use something like:
cObject * chain_description=par("chain").objectValue();
But the basics of how to navigate the object structure are a bit
obscure.
Is there an up-to-date example I can refer to?
If the object is an array like in my case, how can I count the number
of items -- i.e., the number of micro-services?
How can I access the fields of an array or a dictionary (e.g.
chain[0].serviceTime)?
Any help is welcome. Thanks!
--
Saluti,
Riccardo