diff --git a/server/src/gtfpga.c b/server/src/gtfpga.c index 72daded3a..8f753bbca 100644 --- a/server/src/gtfpga.c +++ b/server/src/gtfpga.c @@ -63,12 +63,6 @@ int gtfpga_parse(config_setting_t *cfg, struct node *n) const char *slot, *id, *err; config_setting_t *cfg_slot, *cfg_id; - /* 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); cfg_slot = config_setting_get_member(cfg, "slot"); @@ -247,6 +241,9 @@ int gtfpga_read(struct node *n, struct msg *pool, int poolsize, int first, int c struct gtfpga *g = n->gtfpga; struct msg *m = &pool[first % poolsize]; + + if (cnt != 1) + error("The GTFPGA node type does not support combining!"); uint64_t runs; read(g->fd_irq, &runs, sizeof(runs)); @@ -262,8 +259,10 @@ int gtfpga_read(struct node *n, struct msg *pool, int poolsize, int first, int c int gtfpga_write(struct node *n, struct msg *pool, int poolsize, int first, int cnt) { // struct gtfpga *g = n->gtfpga; - // struct msg *m = &pool[first % poolsize]; + + if (cnt != 1) + error("The GTFPGA node type does not support combining!"); return 0; } diff --git a/server/src/opal.c b/server/src/opal.c index 76d90c463..a7e90a094 100644 --- a/server/src/opal.c +++ b/server/src/opal.c @@ -135,12 +135,6 @@ 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); @@ -206,6 +200,9 @@ int opal_read(struct node *n, struct msg *pool, int poolsize, int first, int cnt struct msg *m = &pool[first % poolsize]; double data[MSG_VALUES]; + + if (cnt != 1) + error("The OPAL-RT node type does not support combining!"); /* This call unblocks when the 'Data Ready' line of a send icon is asserted. */ do { @@ -267,6 +264,9 @@ int opal_write(struct node *n, struct msg *pool, int poolsize, int first, int cn int state; int len; double data[m->length]; + + if (cnt != 1) + error("The OPAL-RT node type does not support combining!"); state = OpalGetAsyncModelState(); if ((state == STATE_RESET) || (state == STATE_STOP))