With these changes an infrastructure can easily read parameters specific to it.
It can define its key under the "infra" json object by implementing the Runner.getName() function then it can read a property with the following function of Config:
public <T> T getInfraProp(String key, T defaultValue) throws ClassCastException
This Pull request adds 2 changes:
Rename Scenario into Config
As the json file now contains more configuration than just the scenario I renamed the corresponding class into
Config
. Applies changes from https://github.com/PolyProcessInterface/ppi/pull/70#issuecomment-645630633Infrastructure specific configuration
With these changes an infrastructure can easily read parameters specific to it. It can define its key under the
"infra"
json object by implementing theRunner.getName()
function then it can read a property with the following function ofConfig
:Here is a usage exemple: https://github.com/PolyProcessInterface/ppi/blob/144bcad141379d8a82437e11177dc98b23fe97ba/src/main/java/org/sar/ppi/peersim/PeerSimRunner.java#L35
Resolves #74