mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
check if node type supports combining before starting
This commit is contained in:
parent
6915ea0c0d
commit
08678c8785
2 changed files with 12 additions and 0 deletions
|
@ -35,6 +35,12 @@ int gtfpga_parse(config_setting_t *cfg, struct node *n)
|
|||
config_setting_t *cfg_slot, *cfg_id;
|
||||
struct gtfpga *g = alloc(sizeof(struct gtfpga));
|
||||
|
||||
/* Checks */
|
||||
if (n->combine != 1) {
|
||||
config_setting_t *cfg_combine = config_setting_get_member(cfg, "combine");
|
||||
cerror(cfg_combine, "The GTFPGA node type does not support combining!");
|
||||
}
|
||||
|
||||
pci_filter_init(NULL, &g->filter);
|
||||
|
||||
if (cfg_slot = config_setting_get_member(cfg, "slot")) {
|
||||
|
|
|
@ -114,6 +114,12 @@ int opal_parse(config_setting_t *cfg, struct node *n)
|
|||
{
|
||||
struct opal *o = alloc(sizeof(struct opal));
|
||||
|
||||
/* Checks */
|
||||
if (n->combine != 1) {
|
||||
config_setting_t *cfg_combine = config_setting_get_member(cfg, "combine");
|
||||
cerror(cfg_combine, "The OPAL-RT node type does not support combining!");
|
||||
}
|
||||
|
||||
config_setting_lookup_int(cfg, "send_id", &o->send_id);
|
||||
config_setting_lookup_int(cfg, "recv_id", &o->recv_id);
|
||||
config_setting_lookup_bool(cfg, "reply", &o->reply);
|
||||
|
|
Loading…
Add table
Reference in a new issue