libGDF
gdf::EventHeader Class Reference

Class that provides access to GDF events. More...

#include <EventHeader.h>

Public Member Functions

 EventHeader ()
 Constructor.
virtual ~EventHeader ()
 Destructor.
void toStream (std::ostream &stream)
 Serializer.
void fromStream (std::istream &stream)
 Deserializer.
void setMode (uint8 mode)
 Set Event Mode.
void setSamplingRate (float32 fs)
 Set Sampling Rate associated with event positions.
uint8 getMode ()
 returns event mode
float32 getSamplingRate ()
 returns sampling rate
uint32 getNumEvents ()
 Number of events.
void getEvent (uint32 index, Mode1Event &ev)
 Returns a Mode 1 Event.
std::vector< Mode1EventgetMode1Events () const
 Returns all Mode 1 Events.
std::vector< Mode3EventgetMode3Events () const
 Returns all Mode 3 Events.
void getEvent (uint32 index, Mode3Event &ev)
 Returns a Mode 3 Event.
void addEvent (const Mode1Event &ev)
 Add a Mode 1 Event.
void addEvent (const Mode3Event &ev)
 Add a Mode 3 Event.
void sort ()
 Sort Events by position.
void clear ()
 Clears all Events.

Detailed Description

Class that provides access to GDF events.

Definition at line 49 of file EventHeader.h.


Member Function Documentation

void gdf::EventHeader::setMode ( uint8  mode)

Set Event Mode.

mode can be 1 or 3 1: (default) Events are stored as position,type pairs 3: Events are stored with position and type, associated to a channel and have a duration or value.

Definition at line 157 of file EventHeader.cpp.

+ Here is the caller graph for this function:

void gdf::EventHeader::setSamplingRate ( float32  fs)

Set Sampling Rate associated with event positions.

Events are not actually sampled, but their position is stored in samples rather than seconds. In order to convert event positions between time and sample, this sampling rate is used.

Definition at line 164 of file EventHeader.cpp.

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Data Structures Functions Variables Friends