1XDF_ADD_EVENT(3)           xdffileio library manual           XDF_ADD_EVENT(3)
2
3
4

NAME

6       xdf_add_event - Appends an event to the data file
7

SYNOPSIS

9       #include <xdfio.h>
10
11       int xdf_add_event(struct xdf* xdf, int evttype,
12                         double onset, double dur);
13

DESCRIPTION

15       xdf_add_event() appends to the file referenced by the handle xdf opened
16       for writing an event of type evttype at time onset lasting for a  dura‐
17       tion  dur expressed in seconds. If the event has no notion of duration,
18       dur should be set to 0. evttype should be a value returned  by  a  suc‐
19       cessful call to xdf_add_evttype(3).
20

RETURN VALUE

22       xdf_add_event()  returns 0 in case of success. Otherwise -1 is returned
23       and errno is set appropriately.
24

ERRORS

26       EINVAL xdf is NULL or  evttype  has  not  been  previously  created  by
27              xdf_add_evttype(3)
28
29       ENOMEM The system is unable to allocate resources.
30
31       EPERM  The  file  referenced  by xdf has not been opened for writing or
32              its file format does not support events.
33

SEE ALSO

35       xdf_add_evttype(3)
36
37
38
39
40EPFL                                 2010                     XDF_ADD_EVENT(3)
Impressum