mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
rebase to master
This commit is contained in:
commit
af09e1bc69
1 changed files with 20 additions and 0 deletions
|
@ -351,6 +351,26 @@ int mqtt_check(struct vnode *n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int mqtt_prepare(struct vnode *n)
|
||||
{
|
||||
int ret;
|
||||
struct mqtt *m = (struct mqtt *) n->_vd;
|
||||
|
||||
ret = io_init(&m->io, m->format, &n->in.signals, (int) SampleFlags::HAS_ALL & ~(int) SampleFlags::HAS_OFFSET);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pool_init(&m->pool, 1024, SAMPLE_LENGTH(vlist_length(&n->in.signals)));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = queue_signalled_init(&m->queue, 1024);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char * mqtt_print(struct vnode *n)
|
||||
{
|
||||
struct mqtt *m = (struct mqtt *) n->_vd;
|
||||
|
|
Loading…
Add table
Reference in a new issue