nidas v1.2.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | List of all members
nidas::core::DSMService Class Referenceabstract

Base class for a service, as built from a <service> XML tag. More...

#include <DSMService.h>

Inheritance diagram for nidas::core::DSMService:
Inheritance graph
[legend]

Public Member Functions

 DSMService (const std::string &name)
 Constructor.
 
virtual ~DSMService ()
 
const std::string & getName () const
 
virtual void setDSMServer (DSMServer *val)
 
virtual DSMServergetDSMServer () const
 
virtual void connect (SampleInput *) throw () =0
 
virtual void addProcessor (SampleIOProcessor *proc)
 Add a processor to this RawSampleService.
 
virtual const std::list< SampleIOProcessor * > & getProcessors () const
 
const std::list< SampleInput * > & getInputs () const
 
ProcessorIterator getProcessorIterator () const
 
virtual void schedule (bool optionalProcessing)=0
 schedule this service to run.
 
virtual int checkSubThreads () throw ()
 
virtual void cancel () throw ()
 
virtual void interrupt () throw ()
 
virtual int join () throw ()
 
void fromDOMElement (const xercesc::DOMElement *node)
 
nidas::util::Thread::SchedPolicy getSchedPolicy () const
 
int getSchedPriority () const
 
virtual void printClock (std::ostream &) throw ()
 
virtual void printStatus (std::ostream &, float) throw ()
 
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 std::string getClassName (const xercesc::DOMElement *node, const Project *)
 
static const XMLChgetNamespaceURI ()
 

Protected Member Functions

void addSubThread (nidas::util::Thread *) throw ()
 

Protected Attributes

std::string _name
 
DSMServer_server
 
std::set< nidas::util::Thread * > _subThreads
 
nidas::util::Mutex _subThreadMutex
 
std::list< SampleInput * > _inputs
 
std::list< SampleIOProcessor * > _processors
 
std::list< IOChannel * > _ochans
 
nidas::util::Thread::SchedPolicy _threadPolicy
 
int _threadPriority
 

Private Member Functions

 DSMService (const DSMService &x)
 Copying not supported.
 
DSMServiceoperator= (const DSMService &x)
 Assignment not supported.
 

Static Private Attributes

static XMLChnamespaceURI = 0
 

Detailed Description

Base class for a service, as built from a <service> XML tag.

Constructor & Destructor Documentation

◆ DSMService() [1/2]

DSMService::DSMService ( const std::string & name)

Constructor.

◆ ~DSMService()

DSMService::~DSMService ( )
virtual

◆ DSMService() [2/2]

nidas::core::DSMService::DSMService ( const DSMService & x)
private

Copying not supported.

Member Function Documentation

◆ addProcessor()

virtual void nidas::core::DSMService::addProcessor ( SampleIOProcessor * proc)
inlinevirtual

Add a processor to this RawSampleService.

This is done at configuration (XML) time.

References _processors.

Referenced by fromDOMElement().

◆ addSubThread()

void DSMService::addSubThread ( nidas::util::Thread * thd)
throw ( )
protected

◆ cancel()

void DSMService::cancel ( )
throw ( )
virtual

◆ checkSubThreads()

int DSMService::checkSubThreads ( )
throw ( )
virtual

◆ connect()

virtual void nidas::core::DSMService::connect ( SampleInput * )
throw ( )
pure virtual

◆ fromDOMElement()

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

◆ getClassName()

const string DSMService::getClassName ( const xercesc::DOMElement * node,
const Project * project )
static

◆ getDSMServer()

virtual DSMServer * nidas::core::DSMService::getDSMServer ( ) const
inlinevirtual

◆ getInputs()

const std::list< SampleInput * > & nidas::core::DSMService::getInputs ( ) const
inline

◆ getName()

const std::string & nidas::core::DSMService::getName ( ) const
inline

◆ getNamespaceURI()

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

◆ getProcessorIterator()

ProcessorIterator DSMService::getProcessorIterator ( ) const

◆ getProcessors()

virtual const std::list< SampleIOProcessor * > & nidas::core::DSMService::getProcessors ( ) const
inlinevirtual

◆ getSchedPolicy()

nidas::util::Thread::SchedPolicy nidas::core::DSMService::getSchedPolicy ( ) const
inline

References _threadPolicy.

◆ getSchedPriority()

int nidas::core::DSMService::getSchedPriority ( ) const
inline

References _threadPriority.

◆ interrupt()

void DSMService::interrupt ( )
throw ( )
virtual

◆ join()

int DSMService::join ( )
throw ( )
virtual

◆ operator=()

DSMService & nidas::core::DSMService::operator= ( const DSMService & x)
private

Assignment not supported.

◆ printClock()

virtual void nidas::core::DSMService::printClock ( std::ostream & )
throw ( )
inlinevirtual

Reimplemented in nidas::dynld::RawSampleService.

◆ printStatus()

virtual void nidas::core::DSMService::printStatus ( std::ostream & ,
float  )
throw ( )
inlinevirtual

Reimplemented in nidas::dynld::RawSampleService.

◆ schedule()

virtual void nidas::core::DSMService::schedule ( bool optionalProcessing)
pure virtual

schedule this service to run.

Exceptions
nidas::util::Exception

Implemented in nidas::dynld::RawSampleService, and nidas::dynld::XMLConfigService.

◆ setDSMServer()

void DSMService::setDSMServer ( DSMServer * val)
virtual

◆ 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

◆ _inputs

std::list<SampleInput*> nidas::core::DSMService::_inputs
protected

◆ _name

std::string nidas::core::DSMService::_name
protected

Referenced by getName().

◆ _ochans

std::list<IOChannel*> nidas::core::DSMService::_ochans
protected

◆ _processors

std::list<SampleIOProcessor*> nidas::core::DSMService::_processors
protected

◆ _server

DSMServer* nidas::core::DSMService::_server
protected

Referenced by getDSMServer(), and setDSMServer().

◆ _subThreadMutex

nidas::util::Mutex nidas::core::DSMService::_subThreadMutex
protected

◆ _subThreads

std::set<nidas::util::Thread*> nidas::core::DSMService::_subThreads
protected

◆ _threadPolicy

nidas::util::Thread::SchedPolicy nidas::core::DSMService::_threadPolicy
protected

Referenced by fromDOMElement(), and getSchedPolicy().

◆ _threadPriority

int nidas::core::DSMService::_threadPriority
protected

Referenced by fromDOMElement(), and getSchedPriority().

◆ namespaceURI

XMLCh * DOMable::namespaceURI = 0
staticprivateinherited

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