mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
nodes: remove hard-coded sample lengths from pool initializations
This commit is contained in:
parent
e0c622af86
commit
c49ee5b21c
4 changed files with 2 additions and 4 deletions
|
@ -51,7 +51,6 @@ extern "C" {
|
|||
}
|
||||
|
||||
#define DEFAULT_ETHERCAT_QUEUE_LENGTH (DEFAULT_QUEUE_LENGTH * 64)
|
||||
#define DEFAULT_ETHERCAT_SAMPLE_LENGTH DEFAULT_SAMPLE_LENGTH
|
||||
|
||||
/** Internal data per ethercat node */
|
||||
struct ethercat {
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
struct vnode;
|
||||
|
||||
#define DEFAULT_WEBSOCKET_QUEUE_LENGTH (DEFAULT_QUEUE_LENGTH * 64)
|
||||
#define DEFAULT_WEBSOCKET_SAMPLE_LENGTH DEFAULT_SAMPLE_LENGTH
|
||||
|
||||
/* Forward declaration */
|
||||
struct lws;
|
||||
|
|
|
@ -389,7 +389,7 @@ int ethercat_init(struct vnode *n)
|
|||
new (&w->thread) std::thread();
|
||||
new (&w->task) Task(CLOCK_REALTIME);
|
||||
|
||||
ret = pool_init(&w->pool, DEFAULT_ETHERCAT_QUEUE_LENGTH, SAMPLE_LENGTH(DEFAULT_ETHERCAT_SAMPLE_LENGTH));
|
||||
ret = pool_init(&w->pool, DEFAULT_ETHERCAT_QUEUE_LENGTH, SAMPLE_LENGTH(vlist_length(&n->in.signals)));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ int websocket_start(struct vnode *n)
|
|||
int ret;
|
||||
struct websocket *w = (struct websocket *) n->_vd;
|
||||
|
||||
ret = pool_init(&w->pool, DEFAULT_WEBSOCKET_QUEUE_LENGTH, SAMPLE_LENGTH(DEFAULT_WEBSOCKET_SAMPLE_LENGTH));
|
||||
ret = pool_init(&w->pool, DEFAULT_WEBSOCKET_QUEUE_LENGTH, SAMPLE_LENGTH(vlist_length(&n->in.signals)));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue