nidas v1.2.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
nidas::dynld::RawSampleInputStream Class Reference

#include <RawSampleInputStream.h>

Inheritance diagram for nidas::dynld::RawSampleInputStream:
Inheritance graph
[legend]

Public Types

typedef nidas::core::dsm_time_t dsm_time_t
 

Public Member Functions

 RawSampleInputStream ()
 Default constructor.
 
 RawSampleInputStream (nidas::core::IOChannel *iochannel)
 Constructor with a connected IOChannel.
 
RawSampleInputStreamclone (nidas::core::IOChannel *)
 Create a copy with a different, connected IOChannel.
 
virtual ~RawSampleInputStream ()
 
void fromDOMElement (const xercesc::DOMElement *node)
 
std::string getName () const
 
int getFd () const
 
virtual void setIOChannel (nidas::core::IOChannel *val)
 Set the IOChannel for this SampleInputStream.h.
 
void readInputHeader ()
 Read archive information at beginning of input stream or file.
 
bool parseInputHeader ()
 
const nidas::core::SampleInputHeadergetInputHeader () const
 
void requestConnection (nidas::core::DSMService *)
 
virtual nidas::core::SampleInputgetOriginal () const
 
nidas::core::SampleInputconnected (nidas::core::IOChannel *iochan) throw ()
 Implementation of IOChannelRequester::connected.
 
void setNonBlocking (bool val)
 
bool isNonBlocking () const
 
const nidas::core::DSMConfiggetDSMConfig () const
 What DSM am I connnected to? May be NULL if it cannot be determined.
 
void setKeepStats (bool val)
 
void addSampleTag (const nidas::core::SampleTag *tag) throw ()
 Implementation of SampleInput::addSampleTag().
 
void removeSampleTag (const nidas::core::SampleTag *tag) throw ()
 
nidas::core::SampleSourcegetRawSampleSource ()
 Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
 
nidas::core::SampleSourcegetProcessedSampleSource ()
 Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
 
std::list< const nidas::core::SampleTag * > getSampleTags () const
 Get the output SampleTags.
 
nidas::core::SampleTagIterator getSampleTagIterator () const
 Implementation of SampleSource::getSampleTagIterator().
 
void addSampleClient (nidas::core::SampleClient *client) throw ()
 Implementation of SampleSource::addSampleClient().
 
void removeSampleClient (nidas::core::SampleClient *client) throw ()
 Remove a SampleClient from this SampleSource.
 
void addSampleClientForTag (nidas::core::SampleClient *client, const nidas::core::SampleTag *tag) throw ()
 Add a Client for a given SampleTag.
 
void removeSampleClientForTag (nidas::core::SampleClient *client, const nidas::core::SampleTag *tag) throw ()
 Remove a SampleClient for a given SampleTag from this SampleSource.
 
int getClientCount () const throw ()
 How many SampleClients are currently in my list.
 
void flush () throw ()
 Implementation of SampleSource::flush(), unpacks and distributes any samples currently in the read buffer.
 
const nidas::core::SampleStatsgetSampleStats () const
 
bool readSamples ()
 Read a buffer of data, serialize the data into samples, and distribute() samples to the receive() method of my SampleClients and DSMSensors.
 
void search (const nidas::util::UTime &tt)
 Search forward until a sample header is read whose time is greater than or equal to tt.
 
nidas::core::SamplereadSample ()
 Read the next sample from the InputStream.
 
void distribute (const nidas::core::Sample *s) throw ()
 Distribute a sample to my clients.
 
size_t getBadSamples () const
 
void close ()
 
void setBadSampleFilter (const nidas::core::BadSampleFilter &bsf)
 Replace the bad sample filter rules for this stream with bsf.
 
void setFilterBadSamples (bool val)
 See BadSampleFilter.
 
void setMinDsmId (int val)
 See BadSampleFilter.
 
void setMaxDsmId (int val)
 See BadSampleFilter.
 
void setMinSampleLength (unsigned int val)
 See BadSampleFilter.
 
void setMaxSampleLength (unsigned int val)
 See BadSampleFilter.
 
void setMinSampleTime (const nidas::util::UTime &val)
 See BadSampleFilter.
 
void setMaxSampleTime (const nidas::util::UTime &val)
 See BadSampleFilter.
 
void setExpectHeader (bool val)
 
bool getExpectHeader () const
 
virtual xercesc::DOMElement * toDOMParent (xercesc::DOMElement *parent, bool complete) const
 Create a DOMElement and append it to the parent.
 
virtual xercesc::DOMElement * toDOMElement (xercesc::DOMElement *node, bool complete) const
 Add my content into a DOMElement.
 

Static Public Member Functions

static const XMLChgetNamespaceURI ()
 

Protected Member Functions

 RawSampleInputStream (RawSampleInputStream &x, nidas::core::IOChannel *)
 Create a copy, but with a new IOChannel.
 

Protected Attributes

nidas::core::IOChannel_iochan
 
nidas::core::SampleSourceSupport _source
 

Private Member Functions

nidas::core::SamplenextSample ()
 Unpack the next sample from the InputStream.
 
nidas::core::SamplenextSample (bool keepreading, bool searching=false, dsm_time_t search_time=LONG_LONG_MIN)
 Unpack the next sample from the InputStream buffer or by reading more data if keepreading is true.
 
void checkUnexpectedEOF ()
 
ReadResult readBlock (bool keepreading, char *&ptr, size_t &lentoread)
 Read a block into memory, updating the given block pointer and length counter accordingly.
 
ReadResult read (bool keepreading, char *ptr, size_t lentoread)
 All reads of the iostream go through here.
 
void handleNewInput ()
 Whenever we are at the start of a new input, we need to start over with parsing the input header.
 
nidas::core::SamplehandleEOF (bool keepreading)
 When EOF has been caught, then either we need to return the last pending sample, or else we need to throw the exception.
 
void closeBlocks ()
 
nidas::core::SamplesampleFromHeader () throw ()
 Check the current header for validity and generate a sample for it.
 

Private Attributes

nidas::core::DSMService_service
 Service that has requested my input.
 
nidas::core::IOStream_iostream
 
const nidas::core::DSMConfig_dsm
 
bool _expectHeader
 
bool _inputHeaderParsed
 
nidas::core::SampleHeader _sheader
 
size_t _headerToRead
 
char_hptr
 
nidas::core::Sample_samp
 Will be non-null if we have previously read part of a sample from the stream.
 
nidas::core::Sample_sampPending
 The currently pending sample.
 
size_t _dataToRead
 How many bytes left to read from the stream into the data portion of samp.
 
char_dptr
 Pointer into the data portion of samp where we will read next.
 
bool _skipSample
 This is set if the data for the current sample header should be read but skipped, because the sample is the first after a block of bad samples and thus the time at the front of the sample might still be corrupt.
 
BlockStats _block
 Information about the current block of samples, good or bad.
 
size_t _badSamples
 Number of bad samples in the stream so far, which is to say number of bytes checked which did not contain a reasonable sample header.
 
size_t _goodSamples
 Number of good samples in the stream so far.
 
nidas::core::SampleInputHeader _inputHeader
 
nidas::core::BadSampleFilter _bsf
 
SampleInputStream_original
 
bool _raw
 
std::string _last_name
 Keep the current name of the input stream so it can be
referenced even after the input stream has advanced to a new input name.
 
nidas::util::EOFException _eofx
 
bool _ateof
 

Static Private Attributes

static XMLChnamespaceURI = 0
 

Member Typedef Documentation

◆ dsm_time_t

Constructor & Destructor Documentation

◆ RawSampleInputStream() [1/3]

RawSampleInputStream::RawSampleInputStream ( )

Default constructor.

Referenced by clone().

◆ RawSampleInputStream() [2/3]

RawSampleInputStream::RawSampleInputStream ( nidas::core::IOChannel * iochannel)

Constructor with a connected IOChannel.

Parameters
iochannelThe IOChannel that we use for data input. RawSampleInputStream will own the pointer to the IOChannel, and will delete it in ~RawSampleInputStream().

◆ ~RawSampleInputStream()

RawSampleInputStream::~RawSampleInputStream ( )
virtual

◆ RawSampleInputStream() [3/3]

RawSampleInputStream::RawSampleInputStream ( RawSampleInputStream & x,
nidas::core::IOChannel * iochannel )
protected

Create a copy, but with a new IOChannel.

Member Function Documentation

◆ addSampleClient()

void nidas::dynld::SampleInputStream::addSampleClient ( nidas::core::SampleClient * client)
throw ( )
inlinevirtualinherited

◆ addSampleClientForTag()

void nidas::dynld::SampleInputStream::addSampleClientForTag ( nidas::core::SampleClient * client,
const nidas::core::SampleTag * tag )
throw ( )
inlinevirtualinherited

◆ addSampleTag()

void nidas::dynld::SampleInputStream::addSampleTag ( const nidas::core::SampleTag * tag)
throw ( )
inlinevirtualinherited

Implementation of SampleInput::addSampleTag().

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::addSampleTag().

◆ checkUnexpectedEOF()

void SampleInputStream::checkUnexpectedEOF ( )
privateinherited

◆ clone()

RawSampleInputStream * RawSampleInputStream::clone ( nidas::core::IOChannel * iochannel)
virtual

Create a copy with a different, connected IOChannel.

Create a clone, with a new, connected IOChannel.

Reimplemented from nidas::dynld::SampleInputStream.

References RawSampleInputStream().

◆ close()

void SampleInputStream::close ( )
virtualinherited

◆ closeBlocks()

void SampleInputStream::closeBlocks ( )
privateinherited

◆ connected()

SampleInput * SampleInputStream::connected ( nidas::core::IOChannel * iochan)
throw ( )
virtualinherited

Implementation of IOChannelRequester::connected.

One can use this method to notify SampleInputStream that the IOChannel is connected, which will cause SampleInputStream to open the IOStream.

Implements nidas::core::IOChannelRequester.

References nidas::core::getSample().

◆ distribute()

void nidas::dynld::SampleInputStream::distribute ( const nidas::core::Sample * s)
throw ( )
inlineinherited

Distribute a sample to my clients.

One could use this to insert a sample into the stream.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::distribute().

Referenced by nidas::dynld::raf::SyncServer::handleSample().

◆ flush()

void SampleInputStream::flush ( )
throw ( )
virtualinherited

◆ fromDOMElement()

void RawSampleInputStream::fromDOMElement ( const xercesc::DOMElement * node)
virtual

◆ getBadSamples()

size_t nidas::dynld::SampleInputStream::getBadSamples ( ) const
inlineinherited

◆ getClientCount()

int nidas::dynld::SampleInputStream::getClientCount ( ) const
throw ( )
inlinevirtualinherited

How many SampleClients are currently in my list.

Exceptions

)

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getClientCount().

◆ getDSMConfig()

const DSMConfig * SampleInputStream::getDSMConfig ( ) const
virtualinherited

What DSM am I connnected to? May be NULL if it cannot be determined.

Implements nidas::core::SampleInput.

References nidas::dynld::SampleInputStream::_dsm.

◆ getExpectHeader()

bool nidas::dynld::SampleInputStream::getExpectHeader ( ) const
inlineinherited

◆ getFd()

int SampleInputStream::getFd ( ) const
virtualinherited

◆ getInputHeader()

const nidas::core::SampleInputHeader & nidas::dynld::SampleInputStream::getInputHeader ( ) const
inlineinherited

◆ getName()

string SampleInputStream::getName ( ) const
virtualinherited

◆ getNamespaceURI()

static const XMLCh * nidas::core::DOMable::getNamespaceURI ( )
inlinestaticinherited

◆ getOriginal()

virtual nidas::core::SampleInput * nidas::dynld::SampleInputStream::getOriginal ( ) const
inlinevirtualinherited

◆ getProcessedSampleSource()

nidas::core::SampleSource * nidas::dynld::SampleInputStream::getProcessedSampleSource ( )
inlinevirtualinherited

Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.

SampleClients use this method to get a pointer to whatever sample source they are interested in. Derived classes can return NULL if they are not a SampleSource of processed samples.

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getProcessedSampleSource().

◆ getRawSampleSource()

nidas::core::SampleSource * nidas::dynld::SampleInputStream::getRawSampleSource ( )
inlinevirtualinherited

Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.

SampleClients use this method to get a pointer to whatever sample source they are interested in. Derived classes can return NULL if they are not a SampleSource of raw samples.

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getRawSampleSource().

◆ getSampleStats()

const nidas::core::SampleStats & nidas::dynld::SampleInputStream::getSampleStats ( ) const
inlinevirtualinherited

◆ getSampleTagIterator()

nidas::core::SampleTagIterator nidas::dynld::SampleInputStream::getSampleTagIterator ( ) const
inlinevirtualinherited

◆ getSampleTags()

std::list< const nidas::core::SampleTag * > nidas::dynld::SampleInputStream::getSampleTags ( ) const
inlinevirtualinherited

◆ handleEOF()

Sample * SampleInputStream::handleEOF ( bool keepreading)
privateinherited

When EOF has been caught, then either we need to return the last pending sample, or else we need to throw the exception.

HOWEVER, because nextSample() is not allowed to throw an IOException when keepreading is false, since in general it does not make sense to trigger EOF when nothing is being read, this handler only throws the exception when keepreading is true.

References nidas::dynld::SampleInputStream::_eofx, nidas::dynld::SampleInputStream::_sampPending, CNAME, DLOG, and nidas::core::getSample().

Referenced by nidas::dynld::SampleInputStream::nextSample(), and nidas::dynld::SampleInputStream::readSamples().

◆ handleNewInput()

void SampleInputStream::handleNewInput ( )
privateinherited

Whenever we are at the start of a new input, we need to start over with parsing the input header.

This method sets up the right state to start over on a new file.

References nidas::dynld::SampleInputStream::_inputHeaderParsed, nidas::dynld::SampleInputStream::_iostream, nidas::core::IOStream::backup(), nidas::dynld::SampleInputStream::closeBlocks(), CNAME, DLOG, nidas::core::IOStream::getNumInputBytes(), and VLOG.

Referenced by nidas::dynld::SampleInputStream::read().

◆ isNonBlocking()

bool SampleInputStream::isNonBlocking ( ) const
virtualinherited

◆ nextSample() [1/2]

Sample * SampleInputStream::nextSample ( )
privateinherited

Unpack the next sample from the InputStream.

This method does not perform any physical reads, so it should not throw EOFException or IOException.

Returns
pointer to a sample if there is one available in the buffer, else NULL.

References nidas::dynld::SampleInputStream::nextSample().

Referenced by nidas::dynld::SampleInputStream::flush(), nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::SampleInputStream::readSample(), nidas::dynld::SampleInputStream::readSamples(), and nidas::dynld::SampleInputStream::search().

◆ nextSample() [2/2]

Sample * SampleInputStream::nextSample ( bool keepreading,
bool searching = false,
dsm_time_t search_time = LONG_LONG_MIN )
privateinherited

Unpack the next sample from the InputStream buffer or by reading more data if keepreading is true.

If searching is set, then reading stops after the first sample header found whose time tag is after search_time, as described in the search() method.

Exceptions
nidas::util::IOException

References nidas::dynld::SampleInputStream::_ateof, nidas::dynld::SampleInputStream::_bsf, nidas::dynld::SampleInputStream::_dataToRead, nidas::dynld::SampleInputStream::_dptr, nidas::dynld::SampleInputStream::_headerToRead, nidas::dynld::SampleInputStream::_hptr, nidas::dynld::SampleInputStream::_inputHeaderParsed, nidas::dynld::SampleInputStream::_samp, nidas::dynld::SampleInputStream::_sampPending, nidas::dynld::SampleInputStream::_sheader, nidas::dynld::SampleInputStream::_skipSample, CNAME, DLOG, nidas::core::BadSampleFilter::filterBadSamples(), nidas::util::UTime::format(), nidas::core::Sample::freeReference(), nidas::core::SampleHeader::getDataByteLength(), nidas::core::Sample::getDataByteLength(), nidas::core::SampleHeader::getRawId(), nidas::core::getSample(), nidas::core::SampleHeader::getSizeOf(), nidas::core::SampleHeader::getTimeTag(), nidas::core::Sample::getTimeTag(), nidas::core::Sample::getVoidDataPtr(), nidas::dynld::SampleInputStream::handleEOF(), nidas::dynld::SampleInputStream::readBlock(), nidas::dynld::SampleInputStream::readInputHeader(), nidas::dynld::SampleInputStream::sampleFromHeader(), nidas::core::SampleHeader::setDataByteLength(), nidas::core::SampleHeader::setRawId(), nidas::core::SampleHeader::setTimeTag(), VLOG, and WLOG.

◆ parseInputHeader()

bool SampleInputStream::parseInputHeader ( )
inherited

◆ read()

SampleInputStream::ReadResult SampleInputStream::read ( bool keepreading,
char * ptr,
size_t lentoread )
privateinherited

All reads of the iostream go through here.

There are three kinds of reads needed:

  • Read to fill the iostream buffer but not a local block. (ptr==0 and keepreading=true)
  • Read from the iostream buffer into a local block (keepreading==false).
  • Read from the iostream to fill a local block, filling the buffer as needed (keepreading=true)

In all these cases, we need to catch if we hit the end of a file to know if the file ended unexpectedly. Also, if we hit the end of a file and a sample is still pending (because filtering is enabled and a sample is not good until it passes the filter and is succeeded by eof or another good sample), then we also need to return that sample. This method records the eof exception but does not pass it on, waiting instead for it to be thrown after any pending sample has been returned by nextSample(). Callers can test ReadResult members for which cases have occurred.

References nidas::dynld::SampleInputStream::_ateof, nidas::dynld::SampleInputStream::_eofx, nidas::dynld::SampleInputStream::_iostream, nidas::core::IOStream::available(), nidas::dynld::SampleInputStream::checkUnexpectedEOF(), CNAME, DLOG, nidas::core::getSample(), nidas::dynld::SampleInputStream::handleNewInput(), nidas::core::IOStream::isNewInput(), nidas::core::IOStream::read(), nidas::core::IOStream::readBuf(), and VLOG.

Referenced by nidas::dynld::SampleInputStream::readBlock(), and nidas::dynld::SampleInputStream::readSamples().

◆ readBlock()

SampleInputStream::ReadResult SampleInputStream::readBlock ( bool keepreading,
char *& ptr,
size_t & lentoread )
privateinherited

Read a block into memory, updating the given block pointer and length counter accordingly.

If keepreading is false, only read into the block what is available from the iostream buffer. Return the ReadResult of the last read. Always return if the current input ends or eof is reached.

References nidas::core::getSample(), and nidas::dynld::SampleInputStream::read().

Referenced by nidas::dynld::SampleInputStream::nextSample().

◆ readInputHeader()

void SampleInputStream::readInputHeader ( )
inherited

◆ readSample()

Sample * SampleInputStream::readSample ( )
virtualinherited

Read the next sample from the InputStream.

The caller must call freeReference on the sample when they're done with it. This method may perform zero or more reads of the IOChannel.

Returns
pointer to a sample, never NULL.
Exceptions
nidas::util::IOException

Implements nidas::core::SampleInput.

References nidas::dynld::SampleInputStream::nextSample().

Referenced by nidas::dynld::raf::SyncRecordReader::init(), and nidas::dynld::raf::SyncRecordReader::read().

◆ readSamples()

bool SampleInputStream::readSamples ( )
virtualinherited

Read a buffer of data, serialize the data into samples, and distribute() samples to the receive() method of my SampleClients and DSMSensors.

This will perform only one physical read of the underlying IOChannel and so is appropriate to use when a select() or poll() has determined that there is data available on the file descriptor, or when the physical device is configured for non-blocking reads.

Returns
false: no data available for physical read, likely the result of an EAGAIN from a non-blocking read on a file descriptor. true: physical read did not necessarily consume all available data.
Exceptions
nidas::util::IOException

Implements nidas::core::SampleInput.

References nidas::dynld::SampleInputStream::_ateof, nidas::dynld::SampleInputStream::_iostream, nidas::dynld::SampleInputStream::_source, nidas::core::IOStream::available(), CNAME, nidas::core::SampleSourceSupport::distribute(), nidas::dynld::SampleInputStream::handleEOF(), nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::SampleInputStream::read(), and VLOG.

◆ removeSampleClient()

void nidas::dynld::SampleInputStream::removeSampleClient ( nidas::core::SampleClient * c)
throw ( )
inlinevirtualinherited

Remove a SampleClient from this SampleSource.

Exceptions

)

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::removeSampleClient().

◆ removeSampleClientForTag()

void nidas::dynld::SampleInputStream::removeSampleClientForTag ( nidas::core::SampleClient * c,
const nidas::core::SampleTag *  )
throw ( )
inlinevirtualinherited

Remove a SampleClient for a given SampleTag from this SampleSource.

The pointer to the SampleClient must remain valid, until after it is removed.

Exceptions

)

Implements nidas::core::SampleSource.

References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::removeSampleClientForTag().

◆ removeSampleTag()

void nidas::dynld::SampleInputStream::removeSampleTag ( const nidas::core::SampleTag * )
throw ( )
inlinevirtualinherited

◆ requestConnection()

void SampleInputStream::requestConnection ( nidas::core::DSMService * requester)
virtualinherited

◆ sampleFromHeader()

Sample * SampleInputStream::sampleFromHeader ( )
throw ( )
privateinherited

◆ search()

void SampleInputStream::search ( const nidas::util::UTime & tt)
inherited

Search forward until a sample header is read whose time is greater than or equal to tt.

Leaves the InputStream positioned so that the next call to readSample() or readSamples() will read the rest of the sample.

Exceptions
nidas::util::IOException

References CNAME, DLOG, and nidas::dynld::SampleInputStream::nextSample().

◆ setBadSampleFilter()

void nidas::dynld::SampleInputStream::setBadSampleFilter ( const nidas::core::BadSampleFilter & bsf)
inlineinherited

Replace the bad sample filter rules for this stream with bsf.

References nidas::dynld::SampleInputStream::_bsf, and nidas::core::getSample().

◆ setExpectHeader()

void nidas::dynld::SampleInputStream::setExpectHeader ( bool val)
inlineinherited

◆ setFilterBadSamples()

void nidas::dynld::SampleInputStream::setFilterBadSamples ( bool val)
inlineinherited

◆ setIOChannel()

void SampleInputStream::setIOChannel ( nidas::core::IOChannel * val)
virtualinherited

◆ setKeepStats()

void nidas::dynld::SampleInputStream::setKeepStats ( bool val)
inlinevirtualinherited

◆ setMaxDsmId()

void nidas::dynld::SampleInputStream::setMaxDsmId ( int val)
inlineinherited

◆ setMaxSampleLength()

void nidas::dynld::SampleInputStream::setMaxSampleLength ( unsigned int val)
inlineinherited

◆ setMaxSampleTime()

void nidas::dynld::SampleInputStream::setMaxSampleTime ( const nidas::util::UTime & val)
inlineinherited

◆ setMinDsmId()

void nidas::dynld::SampleInputStream::setMinDsmId ( int val)
inlineinherited

◆ setMinSampleLength()

void nidas::dynld::SampleInputStream::setMinSampleLength ( unsigned int val)
inlineinherited

◆ setMinSampleTime()

void nidas::dynld::SampleInputStream::setMinSampleTime ( const nidas::util::UTime & val)
inlineinherited

◆ setNonBlocking()

void SampleInputStream::setNonBlocking ( bool val)
virtualinherited

◆ toDOMElement()

xercesc::DOMElement * DOMable::toDOMElement ( xercesc::DOMElement * node,
bool complete ) const
virtualinherited

◆ toDOMParent()

xercesc::DOMElement * DOMable::toDOMParent ( xercesc::DOMElement * parent,
bool complete ) const
virtualinherited

Create a DOMElement and append it to the parent.

Exceptions
xercesc::DOMException

Reimplemented in nidas::core::DSMConfig, nidas::core::DSMSensor, nidas::core::Project, nidas::core::SampleTag, nidas::core::Site, nidas::core::ServerSocket, and nidas::core::Variable.

Member Data Documentation

◆ _ateof

bool nidas::dynld::SampleInputStream::_ateof
privateinherited

◆ _badSamples

size_t nidas::dynld::SampleInputStream::_badSamples
privateinherited

Number of bad samples in the stream so far, which is to say number of bytes checked which did not contain a reasonable sample header.

Referenced by nidas::dynld::SampleInputStream::closeBlocks(), nidas::dynld::SampleInputStream::getBadSamples(), and nidas::dynld::SampleInputStream::sampleFromHeader().

◆ _block

BlockStats nidas::dynld::SampleInputStream::_block
privateinherited

Information about the current block of samples, good or bad.

Referenced by nidas::dynld::SampleInputStream::closeBlocks(), and nidas::dynld::SampleInputStream::sampleFromHeader().

◆ _bsf

nidas::core::BadSampleFilter nidas::dynld::SampleInputStream::_bsf
privateinherited

◆ _dataToRead

size_t nidas::dynld::SampleInputStream::_dataToRead
privateinherited

How many bytes left to read from the stream into the data portion of samp.

Referenced by nidas::dynld::SampleInputStream::checkUnexpectedEOF(), nidas::dynld::SampleInputStream::nextSample(), and nidas::dynld::SampleInputStream::parseInputHeader().

◆ _dptr

char* nidas::dynld::SampleInputStream::_dptr
privateinherited

Pointer into the data portion of samp where we will read next.

Referenced by nidas::dynld::SampleInputStream::nextSample().

◆ _dsm

const nidas::core::DSMConfig* nidas::dynld::SampleInputStream::_dsm
privateinherited

◆ _eofx

nidas::util::EOFException nidas::dynld::SampleInputStream::_eofx
privateinherited

◆ _expectHeader

bool nidas::dynld::SampleInputStream::_expectHeader
privateinherited

◆ _goodSamples

size_t nidas::dynld::SampleInputStream::_goodSamples
privateinherited

Number of good samples in the stream so far.

Referenced by nidas::dynld::SampleInputStream::closeBlocks(), and nidas::dynld::SampleInputStream::sampleFromHeader().

◆ _headerToRead

size_t nidas::dynld::SampleInputStream::_headerToRead
privateinherited

◆ _hptr

char* nidas::dynld::SampleInputStream::_hptr
privateinherited

◆ _inputHeader

nidas::core::SampleInputHeader nidas::dynld::SampleInputStream::_inputHeader
privateinherited

◆ _inputHeaderParsed

bool nidas::dynld::SampleInputStream::_inputHeaderParsed
privateinherited

◆ _iochan

nidas::core::IOChannel* nidas::dynld::SampleInputStream::_iochan
protectedinherited

◆ _iostream

nidas::core::IOStream* nidas::dynld::SampleInputStream::_iostream
privateinherited

◆ _last_name

std::string nidas::dynld::SampleInputStream::_last_name
privateinherited

Keep the current name of the input stream so it can be
referenced even after the input stream has advanced to a new input name.

Referenced by nidas::dynld::SampleInputStream::checkUnexpectedEOF(), nidas::dynld::SampleInputStream::closeBlocks(), and nidas::dynld::SampleInputStream::readInputHeader().

◆ _original

SampleInputStream* nidas::dynld::SampleInputStream::_original
privateinherited

◆ _raw

bool nidas::dynld::SampleInputStream::_raw
privateinherited

◆ _samp

nidas::core::Sample* nidas::dynld::SampleInputStream::_samp
privateinherited

◆ _sampPending

nidas::core::Sample* nidas::dynld::SampleInputStream::_sampPending
privateinherited

The currently pending sample.

When filtering is active, the pending sample is held until the succeeding sample header is confirmed to be good.

Referenced by nidas::dynld::SampleInputStream::handleEOF(), nidas::dynld::SampleInputStream::nextSample(), and nidas::dynld::SampleInputStream::~SampleInputStream().

◆ _service

nidas::core::DSMService* nidas::dynld::SampleInputStream::_service
privateinherited

Service that has requested my input.

Referenced by nidas::dynld::SampleInputStream::requestConnection().

◆ _sheader

nidas::core::SampleHeader nidas::dynld::SampleInputStream::_sheader
privateinherited

◆ _skipSample

bool nidas::dynld::SampleInputStream::_skipSample
privateinherited

This is set if the data for the current sample header should be read but skipped, because the sample is the first after a block of bad samples and thus the time at the front of the sample might still be corrupt.

Referenced by nidas::dynld::SampleInputStream::nextSample(), and nidas::dynld::SampleInputStream::sampleFromHeader().

◆ _source

nidas::core::SampleSourceSupport nidas::dynld::SampleInputStream::_source
protectedinherited

◆ namespaceURI

XMLCh * DOMable::namespaceURI = 0
staticprivateinherited

The documentation for this class was generated from the following files: