Abstract base class for a data source that returns ring items.
This class cannot be instantiated because the public method
getItem
is pure virtual. Normally
one gets a pointer to a CDataSource
object
when creating a data source via
CDataSourceFactory"3daqCDataSourceFactoryCreate data sources given a URI#include <CDataSourceFactory>CDataSourceFactory
staticCDataSource*makeSourcestd::stringuristd::vector<uint16_t>samplestd::vector<uint16_t>excludeDESCRIPTIONThis factory class contains a static method to create a ring item
data source given a URI.METHODSstaticCDataSource*makeSourcestd::stringuristd::vector<uint16_t>samplestd::vector<uint16_t>excludeCreates a new data source object and returns a pointer
to it. The CDataSource object
created is dynamically allocated and needs to be
deleted by the caller.uri describes the data source.
For a live ring this should be of the form
tcp://hostname/ringname
For a file ring this shouild be of the form
file:///path/to/the/file.sample is a vector of ring item
types. Ring data sources are free to skip items of this
type depending on circumstances.exclde is a vector of
ring item types the caller does not want to get from the
data source..
CRingItem* getItem();
This interface method will, for a concrete class, return a
pointer to an item received from the data source. In the event
of an error, a NULL pointer will be
returned or alternatively an integer exception will be thrown.
If an integer exception is thrown its value will be a legitimate
error number from <errno.h>.
If a NULL is returned, the
errno
variable should be checked to
determine if an end of data source condition or some other
error occured. For an end of source condition, the
errno
value will be ESUCCESS