mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
file: add restart callback
This commit is contained in:
parent
7f5b3c235f
commit
437cfb646d
1 changed files with 11 additions and 0 deletions
|
@ -317,6 +317,16 @@ int file_stop(struct node *n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int file_restart(struct node *n)
|
||||
{
|
||||
struct file *f = (struct file *) n->_vd;
|
||||
|
||||
f->offset = file_calc_offset(&f->first, &f->epoch, f->epoch_mode);
|
||||
io_rewind(&f->io);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int file_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release)
|
||||
{
|
||||
struct file *f = (struct file *) n->_vd;
|
||||
|
@ -423,6 +433,7 @@ static struct plugin p = {
|
|||
.print = file_print,
|
||||
.start = file_start,
|
||||
.stop = file_stop,
|
||||
.restart = file_restart,
|
||||
.read = file_read,
|
||||
.write = file_write,
|
||||
.fd = file_fd
|
||||
|
|
Loading…
Add table
Reference in a new issue