CompBindings Class Reference

#include <binding.h>

Collaboration diagram for CompBindings:

List of all members.

Public Types

enum  Type { TypeSum = 0, TypeMax }

Public Member Functions

 CompBindings (Type t=TypeSum)
 CompBindings (vector< double > &maxValues, Type t=TypeSum)
 ~CompBindings ()
Type getType () const
double getMaxVal (const uint param) const
double getCurVal (const uint param) const
uint nrParams () const
bool bind (ComponentBinding *b)
bool unbind (SDFcomponent *c)
ComponentBindingfind (SDFcomponent *c)
ComponentBindingsIter begin ()
ComponentBindingsIter end ()
ComponentBindingsCIter begin () const
ComponentBindingsCIter end () const

Private Attributes

Type type
ComponentBindings bindings
vector< double > maxVals
vector< double > curVals

Detailed Description

CompBindings Container for bindings of components to resource


Member Enumeration Documentation

Enumerator:
TypeSum 
TypeMax 

Constructor & Destructor Documentation

CompBindings::CompBindings ( Type  t = TypeSum  ) 

CompBindings () Constructor.

References type.

CompBindings::CompBindings ( vector< double > &  maxValues,
Type  t = TypeSum 
)

CompBindings () Constructor.

References curVals, maxVals, and type.

CompBindings::~CompBindings (  ) 

~CompBindings () Destructor.

References begin(), and end().

Here is the call graph for this function:


Member Function Documentation

ComponentBindingsCIter CompBindings::begin (  )  const [inline]

References bindings.

bool CompBindings::bind ( ComponentBinding b  ) 

bind () Bind component to resource. On success, resources are claimed and true is returned. Else, the function returns false.

References bindings, curVals, getCurVal(), getType(), ComponentBinding::getValue(), maxVals, nrParams(), and TypeSum.

Referenced by Processor::bindActor(), Connection::bindChannel(), NetworkInterface::reserveConnection(), and Memory::reserveMemory().

Here is the call graph for this function:

ComponentBindingsCIter CompBindings::end (  )  const [inline]
ComponentBinding * CompBindings::find ( SDFcomponent c  ) 

find () Find binding of component to resource.

References begin(), end(), ComponentBinding::getComponent(), and SDFcomponent::getId().

Referenced by LoadBalanceBinding::changeBandwidthAllocation().

Here is the call graph for this function:

double CompBindings::getCurVal ( const uint  param  )  const

getCurVal () The function returns the current value of a parameter.

References curVals, and nrParams().

Referenced by NetworkInterface::availableInBandwidth(), Memory::availableMemorySize(), NetworkInterface::availableNrConnections(), NetworkInterface::availableOutBandwidth(), bind(), and Memory::occupiedMemorySizeByActors().

Here is the call graph for this function:

double CompBindings::getMaxVal ( const uint  param  )  const
Type CompBindings::getType (  )  const [inline]

References type.

Referenced by bind(), and unbind().

uint CompBindings::nrParams (  )  const [inline]

References maxVals.

Referenced by bind(), getCurVal(), getMaxVal(), and unbind().

bool CompBindings::unbind ( SDFcomponent c  ) 

unbind () Remove binding from component to resource.

References begin(), bindings, curVals, end(), ComponentBinding::getComponent(), getType(), ComponentBinding::getValue(), nrParams(), and TypeMax.

Referenced by NetworkInterface::releaseConnection(), Memory::releaseMemory(), Processor::unbindActor(), and Connection::unbindChannel().

Here is the call graph for this function:


Member Data Documentation

vector<double> CompBindings::curVals [private]

Referenced by bind(), CompBindings(), getCurVal(), and unbind().

vector<double> CompBindings::maxVals [private]

Referenced by CompBindings(), and getType().


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