nidas v1.2.3
|
#include <RawSampleInputStream.h>
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. | |
RawSampleInputStream * | clone (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::SampleInputHeader & | getInputHeader () const |
void | requestConnection (nidas::core::DSMService *) |
virtual nidas::core::SampleInput * | getOriginal () const |
nidas::core::SampleInput * | connected (nidas::core::IOChannel *iochan) throw () |
Implementation of IOChannelRequester::connected. | |
void | setNonBlocking (bool val) |
bool | isNonBlocking () const |
const nidas::core::DSMConfig * | getDSMConfig () 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::SampleSource * | getRawSampleSource () |
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples. | |
nidas::core::SampleSource * | getProcessedSampleSource () |
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::SampleStats & | getSampleStats () 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::Sample * | readSample () |
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 XMLCh * | getNamespaceURI () |
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::Sample * | nextSample () |
Unpack the next sample from the InputStream. | |
nidas::core::Sample * | nextSample (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::Sample * | handleEOF (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::Sample * | sampleFromHeader () 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 XMLCh * | namespaceURI = 0 |
RawSampleInputStream::RawSampleInputStream | ( | ) |
Default constructor.
Referenced by clone().
RawSampleInputStream::RawSampleInputStream | ( | nidas::core::IOChannel * | iochannel | ) |
Constructor with a connected IOChannel.
iochannel | The IOChannel that we use for data input. RawSampleInputStream will own the pointer to the IOChannel, and will delete it in ~RawSampleInputStream(). |
|
virtual |
|
protected |
Create a copy, but with a new IOChannel.
|
inlinevirtualinherited |
Implementation of SampleSource::addSampleClient().
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::addSampleClient().
|
inlinevirtualinherited |
Add a Client for a given SampleTag.
Implementation of SampleSource::addSampleClient().
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::addSampleClientForTag().
|
inlinevirtualinherited |
Implementation of SampleInput::addSampleTag().
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::addSampleTag().
|
privateinherited |
References nidas::dynld::SampleInputStream::_dataToRead, nidas::dynld::SampleInputStream::_headerToRead, nidas::dynld::SampleInputStream::_last_name, nidas::dynld::SampleInputStream::_samp, nidas::dynld::SampleInputStream::_sheader, CNAME, nidas::core::Sample::getDataByteLength(), nidas::core::SampleHeader::getSizeOf(), and WLOG.
Referenced by nidas::dynld::SampleInputStream::read().
|
virtual |
Create a copy with a different, connected IOChannel.
Create a clone, with a new, connected IOChannel.
Reimplemented from nidas::dynld::SampleInputStream.
References RawSampleInputStream().
|
virtualinherited |
nidas::util::IOException |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_iochan, nidas::dynld::SampleInputStream::_iostream, nidas::core::IOChannel::close(), and nidas::dynld::SampleInputStream::closeBlocks().
Referenced by NidsMerge::run(), nidas::dynld::raf::SyncServer::stop(), and nidas::dynld::SampleInputStream::~SampleInputStream().
|
privateinherited |
References nidas::dynld::SampleInputStream::_badSamples, nidas::dynld::SampleInputStream::_block, nidas::dynld::SampleInputStream::_bsf, nidas::dynld::SampleInputStream::_goodSamples, nidas::dynld::SampleInputStream::_last_name, nidas::dynld::BlockStats::block_start, CNAME, DLOG, nidas::core::BadSampleFilter::filterBadSamples(), nidas::core::getSample(), nidas::util::LogContextState::log(), LOG_DEBUG, LOG_WARNING, and nidas::dynld::BlockStats::nbytes.
Referenced by nidas::dynld::SampleInputStream::close(), and nidas::dynld::SampleInputStream::handleNewInput().
|
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().
|
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().
|
virtualinherited |
Implementation of SampleSource::flush(), unpacks and distributes any samples currently in the read buffer.
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, CNAME, nidas::core::SampleSourceSupport::distribute(), nidas::core::SampleSourceSupport::getClientCount(), nidas::dynld::SampleInputStream::nextSample(), and VLOG.
|
inlineinherited |
References nidas::dynld::SampleInputStream::_badSamples.
|
inlinevirtualinherited |
How many SampleClients are currently in my list.
)
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getClientCount().
What DSM am I connnected to? May be NULL if it cannot be determined.
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_dsm.
|
inlineinherited |
References nidas::dynld::SampleInputStream::_expectHeader.
|
virtualinherited |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_iochan, and nidas::core::IOChannel::getFd().
|
inlineinherited |
References nidas::dynld::SampleInputStream::_inputHeader.
Referenced by nidas::dynld::raf::SyncRecordReader::init().
|
virtualinherited |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_iochan, and nidas::core::IOChannel::getName().
Referenced by nidas::dynld::SampleInputStream::parseInputHeader(), nidas::dynld::SampleInputStream::readInputHeader(), and nidas::dynld::SampleInputStream::sampleFromHeader().
References nidas::core::DOMable::namespaceURI.
Referenced by nidas::dynld::UDPSampleOutput::getProjectDOM(), nidas::core::Dataset::toDOMElement(), nidas::core::ProjectConfig::toDOMElement(), nidas::core::Dataset::toDOMParent(), nidas::core::Datasets::toDOMParent(), nidas::core::ProjectConfig::toDOMParent(), nidas::core::ProjectConfigs::toDOMParent(), nidas::core::DSMConfig::toDOMParent(), nidas::core::DSMSensor::toDOMParent(), nidas::core::Project::toDOMParent(), nidas::core::SampleTag::toDOMParent(), nidas::core::Site::toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
|
inlinevirtualinherited |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_original.
|
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().
|
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().
|
inlinevirtualinherited |
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getSampleStats().
|
inlinevirtualinherited |
Implementation of SampleSource::getSampleTagIterator().
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getSampleTagIterator().
|
inlinevirtualinherited |
Get the output SampleTags.
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::getSampleTags().
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().
|
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().
|
virtualinherited |
nidas::util::IOException |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_iochan, and nidas::core::IOChannel::isNonBlocking().
|
privateinherited |
Unpack the next sample from the InputStream.
This method does not perform any physical reads, so it should not throw EOFException or IOException.
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().
|
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.
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.
|
inherited |
nidas::util::IOException |
References nidas::dynld::SampleInputStream::_bsf, nidas::dynld::SampleInputStream::_dataToRead, nidas::dynld::SampleInputStream::_expectHeader, nidas::dynld::SampleInputStream::_headerToRead, nidas::dynld::SampleInputStream::_hptr, nidas::dynld::SampleInputStream::_inputHeader, nidas::dynld::SampleInputStream::_inputHeaderParsed, nidas::dynld::SampleInputStream::_iostream, nidas::dynld::SampleInputStream::_samp, nidas::dynld::SampleInputStream::_sheader, nidas::core::IOStream::backup(), CNAME, DLOG, nidas::core::Sample::freeReference(), nidas::dynld::SampleInputStream::getName(), nidas::core::IOStream::getNumInputBytes(), nidas::core::SampleHeader::getSizeOf(), nidas::core::SampleInputHeader::parse(), PLOG, and nidas::core::BadSampleFilter::skipNidasHeader().
Referenced by nidas::dynld::SampleInputStream::readInputHeader().
|
privateinherited |
All reads of the iostream go through here.
There are three kinds of reads needed:
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().
|
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().
|
inherited |
Read archive information at beginning of input stream or file.
nidas::util::IOException |
References nidas::dynld::SampleInputStream::_inputHeaderParsed, nidas::dynld::SampleInputStream::_iostream, nidas::dynld::SampleInputStream::_last_name, CNAME, DLOG, nidas::dynld::SampleInputStream::getName(), nidas::core::IOStream::getNumInputBytes(), nidas::dynld::SampleInputStream::parseInputHeader(), and nidas::core::IOStream::read().
Referenced by nidas::dynld::raf::SyncRecordReader::init(), and nidas::dynld::SampleInputStream::nextSample().
|
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.
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().
|
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.
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.
|
inlinevirtualinherited |
Remove a SampleClient from this SampleSource.
)
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::removeSampleClient().
|
inlinevirtualinherited |
Remove a SampleClient for a given SampleTag from this SampleSource.
The pointer to the SampleClient must remain valid, until after it is removed.
)
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::removeSampleClientForTag().
|
inlinevirtualinherited |
)
Implements nidas::core::SampleSource.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::removeSampleTag().
|
virtualinherited |
|
privateinherited |
Check the current header for validity and generate a sample for it.
References nidas::dynld::SampleInputStream::_badSamples, nidas::dynld::SampleInputStream::_block, nidas::dynld::SampleInputStream::_bsf, nidas::dynld::SampleInputStream::_goodSamples, nidas::dynld::SampleInputStream::_headerToRead, nidas::dynld::SampleInputStream::_hptr, nidas::dynld::SampleInputStream::_iostream, nidas::dynld::SampleInputStream::_sheader, nidas::dynld::SampleInputStream::_skipSample, nidas::util::LogContextState::active(), nidas::dynld::BlockStats::addGoodSample(), CNAME, nidas::dynld::BlockStats::endBadBlock(), nidas::core::BadSampleFilter::filterBadSamples(), ftime(), nidas::core::SampleHeader::getDataByteLength(), nidas::core::SampleHeader::getId(), nidas::dynld::SampleInputStream::getName(), nidas::core::IOStream::getNumInputBytes(), nidas::core::getSample(), nidas::core::SampleHeader::getSizeOf(), nidas::core::SampleHeader::getTimeTag(), nidas::core::SampleHeader::getType(), nidas::dynld::BlockStats::good, nidas::core::BadSampleFilter::invalidSampleHeader(), nidas::util::LogContextState::log(), LOG_DEBUG, LOG_WARNING, nidas::dynld::BlockStats::nbytes, nidas::dynld::BlockStats::start_time, nidas::dynld::BlockStats::startBadBlock(), and WLOG.
Referenced by nidas::dynld::SampleInputStream::nextSample().
|
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.
nidas::util::IOException |
References CNAME, DLOG, and nidas::dynld::SampleInputStream::nextSample().
|
inlineinherited |
Replace the bad sample filter rules for this stream with bsf
.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::getSample().
References nidas::dynld::SampleInputStream::_expectHeader, and nidas::core::getSample().
Referenced by nidas::dynld::SampleInputStream::setIOChannel().
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setFilterBadSamples().
|
virtualinherited |
Set the IOChannel for this SampleInputStream.h.
References nidas::dynld::SampleInputStream::_dsm, nidas::dynld::SampleInputStream::_iochan, nidas::core::IOChannel::close(), nidas::core::IOChannel::getConnectionInfo(), nidas::core::Project::getInstance(), nidas::core::getSample(), nidas::dynld::SampleInputStream::setExpectHeader(), and nidas::core::IOChannel::writeNidasHeader().
Referenced by nidas::dynld::SampleInputStream::fromDOMElement(), nidas::dynld::SampleInputStream::SampleInputStream(), and nidas::dynld::SampleInputStream::SampleInputStream().
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_source, and nidas::core::SampleSourceSupport::setKeepStats().
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMaxDsmId().
Referenced by nidas::dynld::raf::SyncServer::openStream().
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMaxSampleLength().
|
inlineinherited |
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMaxSampleTime().
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMinDsmId().
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMinSampleLength().
|
inlineinherited |
See BadSampleFilter.
References nidas::dynld::SampleInputStream::_bsf, and nidas::core::BadSampleFilter::setMinSampleTime().
nidas::util::IOException |
Implements nidas::core::SampleInput.
References nidas::dynld::SampleInputStream::_iochan, and nidas::core::IOChannel::setNonBlocking().
|
virtualinherited |
Add my content into a DOMElement.
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.
Referenced by nidas::core::ServerSocket::toDOMParent().
|
virtualinherited |
Create a DOMElement and append it to the parent.
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.
|
privateinherited |
|
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().
|
privateinherited |
Information about the current block of samples, good or bad.
Referenced by nidas::dynld::SampleInputStream::closeBlocks(), and nidas::dynld::SampleInputStream::sampleFromHeader().
|
privateinherited |
Referenced by nidas::dynld::SampleInputStream::closeBlocks(), nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::SampleInputStream::parseInputHeader(), nidas::dynld::SampleInputStream::sampleFromHeader(), nidas::dynld::SampleInputStream::setBadSampleFilter(), nidas::dynld::SampleInputStream::setFilterBadSamples(), nidas::dynld::SampleInputStream::setMaxDsmId(), nidas::dynld::SampleInputStream::setMaxSampleLength(), nidas::dynld::SampleInputStream::setMaxSampleTime(), nidas::dynld::SampleInputStream::setMinDsmId(), nidas::dynld::SampleInputStream::setMinSampleLength(), and nidas::dynld::SampleInputStream::setMinSampleTime().
|
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().
|
privateinherited |
Pointer into the data portion of samp where we will read next.
Referenced by nidas::dynld::SampleInputStream::nextSample().
|
privateinherited |
|
privateinherited |
Referenced by nidas::dynld::SampleInputStream::handleEOF(), and nidas::dynld::SampleInputStream::read().
|
privateinherited |
|
privateinherited |
Number of good samples in the stream so far.
Referenced by nidas::dynld::SampleInputStream::closeBlocks(), and nidas::dynld::SampleInputStream::sampleFromHeader().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
Referenced by nidas::dynld::SampleInputStream::close(), fromDOMElement(), nidas::dynld::SampleInputStream::fromDOMElement(), nidas::dynld::SampleInputStream::getFd(), nidas::dynld::SampleInputStream::getName(), nidas::dynld::SampleInputStream::isNonBlocking(), nidas::dynld::SampleInputStream::requestConnection(), nidas::dynld::SampleInputStream::SampleInputStream(), nidas::dynld::SampleInputStream::SampleInputStream(), nidas::dynld::SampleInputStream::setIOChannel(), nidas::dynld::SampleInputStream::setNonBlocking(), and nidas::dynld::SampleInputStream::~SampleInputStream().
|
privateinherited |
Referenced by nidas::dynld::SampleInputStream::close(), nidas::dynld::SampleInputStream::handleNewInput(), nidas::dynld::SampleInputStream::parseInputHeader(), nidas::dynld::SampleInputStream::read(), nidas::dynld::SampleInputStream::readInputHeader(), nidas::dynld::SampleInputStream::readSamples(), nidas::dynld::SampleInputStream::sampleFromHeader(), nidas::dynld::SampleInputStream::SampleInputStream(), and nidas::dynld::SampleInputStream::SampleInputStream().
|
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().
|
privateinherited |
Referenced by nidas::dynld::SampleInputStream::getOriginal().
|
privateinherited |
|
privateinherited |
Will be non-null if we have previously read part of a sample from the stream.
Referenced by nidas::dynld::SampleInputStream::checkUnexpectedEOF(), nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::SampleInputStream::parseInputHeader(), and nidas::dynld::SampleInputStream::~SampleInputStream().
|
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().
|
privateinherited |
Service that has requested my input.
Referenced by nidas::dynld::SampleInputStream::requestConnection().
|
privateinherited |
|
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().
|
protectedinherited |
Referenced by nidas::dynld::SampleInputStream::addSampleClient(), nidas::dynld::SampleInputStream::addSampleClientForTag(), nidas::dynld::SampleInputStream::addSampleTag(), nidas::dynld::SampleInputStream::distribute(), nidas::dynld::SampleInputStream::flush(), nidas::dynld::SampleInputStream::getClientCount(), nidas::dynld::SampleInputStream::getProcessedSampleSource(), nidas::dynld::SampleInputStream::getRawSampleSource(), nidas::dynld::SampleInputStream::getSampleStats(), nidas::dynld::SampleInputStream::getSampleTagIterator(), nidas::dynld::SampleInputStream::getSampleTags(), nidas::dynld::SampleInputStream::readSamples(), nidas::dynld::SampleInputStream::removeSampleClient(), nidas::dynld::SampleInputStream::removeSampleClientForTag(), nidas::dynld::SampleInputStream::removeSampleTag(), and nidas::dynld::SampleInputStream::setKeepStats().
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().