- /* ********************************************************************* */
- /* TUTORIAL: New model */
- sprintf(description,
- "The model to use for the New model. Possible values: ");
- p = description;
- while (*(++p) != '\0');
- for (i = 0; surf_new_model_description[i].name; i++)
- p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
- surf_new_model_description[i].name);
- sprintf(p,
- ".\n (use 'help' as a value to see the long description of each model)");
- xbt_cfg_register(&_sg_cfg_set, "new_model/model", description, xbt_cfgelm_string,
- NULL, 1, 1, &_sg_cfg_cb__storage_mode,
- NULL);
- xbt_cfg_setdefault_string(_sg_cfg_set, "new_model/model", "default");
- /* ********************************************************************* */
-
- sprintf(description,
- "The model to use for the network. Possible values: ");
- p = description;
- while (*(++p) != '\0');
- for (i = 0; surf_network_model_description[i].name; i++)
- p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
- surf_network_model_description[i].name);
- sprintf(p,
- ".\n (use 'help' as a value to see the long description of each model)");
- xbt_cfg_register(&_sg_cfg_set, "network/model", description, xbt_cfgelm_string,
- NULL, 1, 1, &_sg_cfg_cb__network_model,
- NULL);
+ describe_model(description, surf_network_model_description,
+ "model", "The model to use for the network");
+ xbt_cfg_register(&_sg_cfg_set, "network/model", description,
+ xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__network_model, NULL);