solarpowerlog trunk
IInverterBase Class Reference

#include <InverterBase.h>

Inheritance diagram for IInverterBase:
Collaboration diagram for IInverterBase:

List of all members.

Public Member Functions

 IInverterBase (const string &name, const string &configurationpath, const string &role)
virtual ~IInverterBase ()
virtual const std::string & GetName (void) const
virtual CCapabilityGetConcreteCapability (const string &identifier)
virtual ICapaIteratorGetCapaNewIterator ()
virtual bool CheckConfig ()=0
virtual const std::string & GetConfigurationPath () const
virtual IConnectgetConnection (void) const

Protected Member Functions

virtual void AddCapability (const string &id, CCapability *capa)
 Add a Capability for the inverter.
virtual void AddCapability (CCapability *capa)
 Add a Capability for the inverter.
virtual map< string,
CCapability * >::iterator 
GetCapabilityIterator (void)
virtual map< string,
CCapability * >::iterator 
GetCapabilityLastIterator (void)

Protected Attributes

std::string configurationpath
std::string name
IConnectconnection
map< string, CCapability * > CapabilityMap
ILogger logger
 The Logger Class for Debugging, Error reporting etc...

Friends

class ICapaIterator

Detailed Description

Inverter Interface ....

Definition at line 227 of file InverterBase.h.


Constructor & Destructor Documentation

IInverterBase::IInverterBase ( const string &  name,
const string &  configurationpath,
const string &  role 
)

Constructor for the Inverter Interface. The baseclass does this already for their concrete Implementations:

  • Create the connection (out of config, if not needed a dummy will be created
  • Create the "must have" Capabilites
    • CAPA_CAPAS_UPDATED
    • CAPA_CAPAS_REMOVEALL
    • CAPA_INVERTER_DATASTATE
      Note:
      : DataFilters might want to delete one or more of them (out of their instance!), if they are sure that they don't need them. For example, a DataFilter has usually no influence over data validity. If it deletes its Capability, its client will automatically get the one of the inverter)
      Parameters:
      nameof the Inverter (name as in the config)
      configurationpathis the path to access this inverters config
      rolespecifies the role in which the inverter is used. Currently this is only used to setup the correct logging path for the associated logger. use "inverter" for inverters and "datafilter" for filters.

Definition at line 53 of file InverterBase.cpp.

Here is the call graph for this function:

IInverterBase::~IInverterBase ( ) [virtual]

Definition at line 90 of file InverterBase.cpp.


Member Function Documentation

void IInverterBase::AddCapability ( const string &  id,
CCapability capa 
) [protected, virtual]

Add a Capability for the inverter.

Definition at line 137 of file InverterBase.cpp.

virtual void IInverterBase::AddCapability ( CCapability capa) [inline, protected, virtual]

Add a Capability for the inverter.

Definition at line 293 of file InverterBase.h.

Here is the call graph for this function:

virtual bool IInverterBase::CheckConfig ( ) [pure virtual]

Check Configuration

Returns:
false on error, true on success.

Implemented in IDataFilter.

map< string, CCapability * >::iterator IInverterBase::GetCapabilityIterator ( void  ) [protected, virtual]

returns a iterator of the Capabilties. The iterator is inizialized at the begin of the map.

Definition at line 115 of file InverterBase.cpp.

map< string, CCapability * >::iterator IInverterBase::GetCapabilityLastIterator ( void  ) [protected, virtual]

return a iterator of the Capabilites. The iterator is placed at the end of the map This allows a end-of-list check

Definition at line 123 of file InverterBase.cpp.

ICapaIterator * IInverterBase::GetCapaNewIterator ( ) [virtual]

Get a Iterator over all Capability. Filters may overload it to provide a CCapaNestedIterator.

Warning:
you are responsible deleting the iterator! Use auto_ptr !

Reimplemented in IDataFilter.

Definition at line 109 of file InverterBase.cpp.

CCapability * IInverterBase::GetConcreteCapability ( const string &  identifier) [virtual]

check for a specific capability and return the pointer to it returns NULL if it is not registered.

Reimplemented in IDataFilter.

Definition at line 129 of file InverterBase.cpp.

virtual const std::string& IInverterBase::GetConfigurationPath ( ) const [inline, virtual]

Definition at line 276 of file InverterBase.h.

virtual IConnect* IInverterBase::getConnection ( void  ) const [inline, virtual]

Definition at line 281 of file InverterBase.h.

const std::string & IInverterBase::GetName ( void  ) const [virtual]

Getter for the name property. (Inverter Name equals to the one given in the config)

Definition at line 104 of file InverterBase.cpp.


Friends And Related Function Documentation

friend class ICapaIterator [friend]

Definition at line 231 of file InverterBase.h.


Member Data Documentation

map<string, CCapability*> IInverterBase::CapabilityMap [protected]

Definition at line 328 of file InverterBase.h.

std::string IInverterBase::configurationpath [protected]

Configuration path as determined on start -- for easier fetching the config.

Definition at line 307 of file InverterBase.h.

Definition at line 316 of file InverterBase.h.

The Logger Class for Debugging, Error reporting etc...

Definition at line 331 of file InverterBase.h.

std::string IInverterBase::name [protected]

Inverter Name -- as in config

Definition at line 309 of file InverterBase.h.


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