nidas v1.2.3
|
#include <SampleProcessor.h>
Static Public Member Functions | |
static const XMLCh * | getNamespaceURI () |
Protected Member Functions | |
void | removeRequestedSampleTag (SampleTag *tag) |
Allow subclasses to remove requested SampleTags. | |
Protected Attributes | |
SampleSourceSupport | _source |
nidas::util::Mutex | _tagsMutex |
std::list< SampleTag * > | _requestedTags |
Private Member Functions | |
SampleProcessor (const SampleProcessor &) | |
Copy not supported. | |
SampleProcessor & | operator= (const SampleProcessor &) |
Assignment not supported. | |
Private Attributes | |
nidas::util::Mutex | _connectionMutex |
std::set< SampleSource * > | _connectedSources |
std::set< SampleOutput * > | _connectedOutputs |
std::string | _name |
dsm_sample_id_t | _id |
std::list< const SampleTag * > | _constRequestedTags |
std::list< SampleOutput * > | _origOutputs |
bool | _optional |
const DSMService * | _service |
What service am I a part of? | |
const DSMConfig * | _dsm |
Or, what DSM am I a part of? | |
std::list< Parameter * > | _parameters |
std::list< const Parameter * > | _constParameters |
Static Private Attributes | |
static XMLCh * | namespaceURI = 0 |
SampleProcessor::SampleProcessor | ( | ) |
SampleProcessor::~SampleProcessor | ( | ) |
References _connectedOutputs, _connectedSources, _connectionMutex, nidas::core::SampleOutput::close(), nidas::core::SampleClient::flush(), nidas::core::SampleOutput::getName(), nidas::core::SampleOutput::getOriginal(), nidas::core::getSample(), nidas::util::Mutex::lock(), LOG_ERR, nidas::core::SampleSource::removeSampleClient(), and nidas::util::Mutex::unlock().
|
private |
Copy not supported.
|
inlinevirtualinherited |
Add an SampleOutput to this SampleIOProcessor.
This is used to add a desired SampleOutput to this SampleIOProcessor. SampleIOProcessor will own the SampleOutput. Once a SampleSource has connected, then SampleIOProcessor is responsible for do SampleOutput::requestConnection, or SampleOutputRequestThread::addConnectRequest() on all these as-yet disconnected outputs.
References nidas::core::SampleIOProcessor::_origOutputs.
Referenced by nidas::core::SampleIOProcessor::fromDOMElement().
Add a parameter to this SampleIOProcessor, which will then own the pointer and will delete it in its destructor.
If a Parameter exists with the same name, it will be replaced with the new Parameter.
nidas::util::InvalidParameterException |
References nidas::core::SampleIOProcessor::_constParameters, and nidas::core::SampleIOProcessor::_parameters.
Referenced by nidas::core::SampleIOProcessor::fromDOMElement().
Add a request for a SampleTag from this SampleIOProcessor.
This SampleIOProcessor will own the SampleTag.
nidas::util::InvalidParameterException |
Reimplemented in nidas::dynld::raf::CVIProcessor, and nidas::dynld::StatisticsProcessor.
References nidas::core::SampleIOProcessor::_constRequestedTags, nidas::core::SampleIOProcessor::_requestedTags, nidas::core::SampleIOProcessor::_tagsMutex, and nidas::core::getSample().
Referenced by nidas::dynld::raf::CVIProcessor::addRequestedSampleTag(), nidas::dynld::StatisticsProcessor::addRequestedSampleTag(), and nidas::core::SampleIOProcessor::fromDOMElement().
|
inlinevirtualinherited |
Implementation of SampleSource::addSampleClient().
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::addSampleClient().
|
inlinevirtualinherited |
Add a Client for a given SampleTag.
Implementation of SampleSource::addSampleClient().
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::addSampleClientForTag().
Implementation of SampleSource::addSampleTag().
Implements nidas::core::SampleSource.
Referenced by nidas::dynld::raf::CVIProcessor::addRequestedSampleTag(), and nidas::dynld::StatisticsProcessor::connectSource().
|
virtual |
How SampleOutputs notify their SampleConnectionRequester that they are connected.
Implements nidas::core::SampleConnectionRequester.
References nidas::core::SampleSource::addSampleClient(), and nidas::core::getSample().
|
overridevirtual |
Connect a SampleSource to this SampleIOProcessor.
SampleIOProcessor does not own the SampleSource.
Implements nidas::core::SampleIOProcessor.
References _connectedOutputs, _connectedSources, _connectionMutex, nidas::core::SampleSource::addSampleClient(), nidas::core::SampleOutput::addSourceSampleTags(), nidas::core::SampleOutputRequestThread::getInstance(), nidas::core::SampleIOProcessor::getOutputs(), nidas::core::SampleSource::getProcessedSampleSource(), nidas::core::getSample(), and nidas::core::SampleSource::getSampleTags().
|
virtual |
How SampleOutputs notify their SampleConnectionRequester that they wish to be closed, likely do to an IOException.
Implements nidas::core::SampleConnectionRequester.
References nidas::core::SampleOutputRequestThread::getInstance(), nidas::core::SampleOutput::getOriginal(), nidas::core::getSample(), LOG_ERR, and nidas::core::SampleSource::removeSampleClient().
|
virtual |
Disconnect a SampleSource from this SampleIOProcessor.
Implements nidas::core::SampleIOProcessor.
References nidas::core::getSample().
|
virtual |
Request that this SampleSource flush it's samples.
One must think about whether to call flush() on SampleClients of this SampleSource. A SampleClient may have multiple SampleSources and a flush() of it when one SampleSource() is done may not be what is wanted.
)
Implements nidas::core::SampleSource.
References _connectedOutputs, _connectionMutex, nidas::core::SampleClient::flush(), nidas::core::getSample(), nidas::util::Mutex::lock(), and nidas::util::Mutex::unlock().
nidas::util::InvalidParameterException |
Implements nidas::core::DOMable.
References nidas::core::SampleIOProcessor::_origOutputs, nidas::core::SampleIOProcessor::addOutput(), nidas::core::SampleIOProcessor::addParameter(), nidas::core::SampleIOProcessor::addRequestedSampleTag(), nidas::core::DOMObjectFactory::createObject(), nidas::core::Parameter::createParameter(), nidas::core::SampleTag::fromDOMElement(), nidas::core::DOMable::fromDOMElement(), nidas::core::SampleIOProcessor::getId(), nidas::core::Project::getInstance(), nidas::core::SampleIOProcessor::getRequestedSampleTags(), nidas::core::getSample(), nidas::core::SampleTag::getSampleId(), nidas::core::SampleIOProcessor::setOptional(), nidas::core::SampleIOProcessor::setSampleId(), nidas::core::SampleTag::setSampleId(), nidas::core::SampleTag::setSensorId(), and WLOG.
Referenced by nidas::dynld::raf::CVIProcessor::fromDOMElement().
|
inlinevirtualinherited |
How many SampleClients are currently in my list.
)
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::getClientCount().
|
inlinevirtualinherited |
What DSM am I associated with?
References nidas::core::SampleIOProcessor::_dsm.
Referenced by nidas::dynld::raf::CVIProcessor::addRequestedSampleTag().
|
inlineinherited |
References nidas::core::SampleIOProcessor::_id, and GET_FULL_ID.
Referenced by nidas::core::SampleIOProcessor::fromDOMElement().
|
virtualinherited |
References nidas::core::SampleIOProcessor::_name.
Referenced by nidas::dynld::StatisticsProcessor::addRequestedSampleTag(), nidas::dynld::StatisticsProcessor::connectSource(), nidas::dynld::raf::CVIProcessor::fromDOMElement(), nidas::dynld::raf::CVIProcessor::~CVIProcessor(), and nidas::dynld::StatisticsProcessor::~StatisticsProcessor().
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 |
References nidas::core::SampleIOProcessor::_origOutputs.
Referenced by nidas::core::SampleArchiver::connectSource(), nidas::dynld::raf::CVIProcessor::connectSource(), connectSource(), nidas::dynld::StatisticsProcessor::connectSource(), nidas::dynld::raf::SyncRecordGenerator::connectSource(), and nidas::core::Project::findServerSampleOutputStreamFileSets().
|
inlineinherited |
Get list of parameters.
References nidas::core::SampleIOProcessor::_constParameters.
Referenced by nidas::dynld::raf::CVIProcessor::fromDOMElement().
|
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::core::SampleIOProcessor::_source.
|
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::core::SampleIOProcessor::_constRequestedTags, nidas::core::SampleIOProcessor::_tagsMutex, and nidas::core::getSample().
Referenced by nidas::dynld::StatisticsProcessor::addRequestedSampleTag(), nidas::dynld::StatisticsProcessor::connectSource(), nidas::core::SampleIOProcessor::fromDOMElement(), and nidas::core::SampleTagIterator::hasNext().
References nidas::core::SampleIOProcessor::_id, and GET_SPS_ID.
Referenced by nidas::dynld::StatisticsProcessor::selectRequestedSampleTags().
|
inlinevirtualinherited |
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::getSampleStats().
|
inlinevirtualinherited |
Implementation of SampleSource::getSampleTagIterator().
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::getSampleTagIterator().
|
inlinevirtualinherited |
Implementation of SampleSource::getSampleTags().
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::getSampleTags().
Referenced by nidas::dynld::raf::CVIProcessor::addRequestedSampleTag(), nidas::dynld::raf::CVIProcessor::connectSource(), and nidas::dynld::StatisticsProcessor::connectSource().
|
inlinevirtualinherited |
What DSMService am I associated with?
References nidas::core::SampleIOProcessor::_service.
|
inlinevirtualinherited |
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_optional.
|
private |
Assignment not supported.
|
inlinevirtualinherited |
Reimplemented in nidas::core::SampleArchiver, and nidas::dynld::raf::SyncRecordGenerator.
Referenced by nidas::dynld::RawSampleService::printStatus().
Allow subclasses to remove requested SampleTags.
The tag will be deleted.
References nidas::core::SampleIOProcessor::_constRequestedTags, nidas::core::SampleIOProcessor::_requestedTags, nidas::core::SampleIOProcessor::_tagsMutex, and nidas::core::getSample().
Referenced by nidas::dynld::StatisticsProcessor::selectRequestedSampleTags().
|
inlinevirtualinherited |
Remove a SampleClient from this SampleSource.
)
Implements nidas::core::SampleSource.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_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.
Reimplemented in nidas::dynld::raf::SyncRecordGenerator.
References nidas::core::SampleIOProcessor::_source, and nidas::core::SampleSourceSupport::removeSampleClientForTag().
|
inlinevirtualinherited |
References nidas::core::SampleIOProcessor::_dsm, and nidas::core::getSample().
References nidas::core::SampleIOProcessor::_optional, and nidas::core::getSample().
Referenced by nidas::core::SampleIOProcessor::fromDOMElement().
References nidas::core::SampleIOProcessor::_id, and SET_SPS_ID.
Referenced by nidas::core::SampleIOProcessor::fromDOMElement().
|
inlinevirtualinherited |
References nidas::core::SampleIOProcessor::_service, and nidas::core::getSample().
|
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.
|
private |
Referenced by connectSource(), flush(), and ~SampleProcessor().
|
private |
Referenced by connectSource(), and ~SampleProcessor().
|
private |
Referenced by connectSource(), flush(), and ~SampleProcessor().
Or, what DSM am I a part of?
Referenced by nidas::core::SampleIOProcessor::getDSMConfig(), and nidas::core::SampleIOProcessor::setDSMConfig().
|
privateinherited |
|
privateinherited |
Referenced by nidas::core::SampleIOProcessor::getName(), and nidas::core::SampleIOProcessor::setName().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
|
privateinherited |
What service am I a part of?
Referenced by nidas::core::SampleIOProcessor::getService(), and nidas::core::SampleIOProcessor::setService().
|
protectedinherited |
Referenced by nidas::core::SampleIOProcessor::addSampleClient(), nidas::core::SampleIOProcessor::addSampleClientForTag(), nidas::core::SampleIOProcessor::getClientCount(), nidas::core::SampleIOProcessor::getProcessedSampleSource(), nidas::core::SampleIOProcessor::getSampleStats(), nidas::core::SampleIOProcessor::getSampleTagIterator(), nidas::core::SampleIOProcessor::getSampleTags(), nidas::core::SampleIOProcessor::removeSampleClient(), and nidas::core::SampleIOProcessor::removeSampleClientForTag().
|
mutableprotectedinherited |
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().