From 1ac7751e5b9df5f09500aca9e5b34bb9cfa912b4 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 9 Dec 2011 07:12:44 +0100 Subject: Initial support of event streaming in cli --- pcilib.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'pcilib.h') diff --git a/pcilib.h b/pcilib.h index a51b050..18806f9 100644 --- a/pcilib.h +++ b/pcilib.h @@ -86,10 +86,15 @@ typedef enum { typedef enum { PCILIB_EVENT_FLAGS_DEFAULT = 0, - PCILIB_EVENT_FLAG_RAW_DATA_ONLY = 1, - PCILIB_EVENT_FLAG_EOF = 2 + PCILIB_EVENT_FLAG_RAW_DATA_ONLY = 1, /**< Do not parse data, just read raw and pass it to rawdata callback */ + PCILIB_EVENT_FLAG_STOP_ONLY = 1, /**< Do not cleanup, just stop acquiring new frames, the cleanup should be requested afterwards */ + PCILIB_EVENT_FLAG_EOF = 2 /**< Indicates that it is the last part of the frame (not required) */ } pcilib_event_flags_t; +typedef enum { + PCILIB_EVENT_INFO_FLAG_BROKEN = 1 /**< Indicates broken frames (if this flag is fales, the frame still can be broken) */ +} pcilib_event_info_flags_t; + typedef enum { PCILIB_REGISTER_STANDARD = 0, PCILIB_REGISTER_FIFO, @@ -118,18 +123,16 @@ typedef enum { #define PCILIB_EVENT3 8 #define PCILIB_EVENTS_ALL ((pcilib_event_t)-1) #define PCILIB_EVENT_INVALID ((pcilib_event_t)-1) -//#define PCILIB_EVENT_ID_INVALID 0 #define PCILIB_TIMEOUT_INFINITE ((pcilib_timeout_t)-1) #define PCILIB_TIMEOUT_IMMEDIATE 0 -#define PCILIB_TIMEOUT_TRIGGER 0 #define PCILIB_IRQ_SOURCE_DEFAULT 0 - typedef struct { pcilib_event_t type; - uint64_t seqnum; /* we will add seqnum_overflow if required */ - uint64_t offset; /* nanoseconds */ - struct timeval timestamp; /* most accurate timestamp */ + uint64_t seqnum; /**< we will add seqnum_overflow if required */ + uint64_t offset; /**< nanoseconds */ + struct timeval timestamp; /**< most accurate timestamp */ + pcilib_event_info_flags_t flags; /**< flags */ } pcilib_event_info_t; /**< -- cgit v1.2.3