CompBindings Class Reference
#include <binding.h>
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) |
ComponentBinding * | find (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
enum CompBindings::Type |
Constructor & Destructor Documentation
CompBindings::CompBindings | ( | Type | t = TypeSum |
) |
CompBindings () Constructor.
References type.
CompBindings::CompBindings | ( | vector< double > & | maxValues, | |
Type | t = TypeSum | |||
) |
CompBindings () Constructor.
CompBindings::~CompBindings | ( | ) |
Member Function Documentation
ComponentBindingsIter CompBindings::begin | ( | ) | [inline] |
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().
ComponentBindingsIter CompBindings::end | ( | ) | [inline] |
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().
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().
double CompBindings::getMaxVal | ( | const uint | param | ) | const |
getMaxVal () The function returns the maximum value of a parameter.
References maxVals, and nrParams().
Referenced by NetworkInterface::availableInBandwidth(), Memory::availableMemorySize(), NetworkInterface::availableNrConnections(), NetworkInterface::availableOutBandwidth(), NetworkInterface::getInBandwidth(), NetworkInterface::getNrConnections(), NetworkInterface::getOutBandwidth(), and Memory::getSize().
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().
Member Data Documentation
ComponentBindings CompBindings::bindings [private] |
vector<double> CompBindings::curVals [private] |
Referenced by bind(), CompBindings(), getCurVal(), and unbind().
vector<double> CompBindings::maxVals [private] |
Referenced by bind(), CompBindings(), getMaxVal(), and nrParams().
Type CompBindings::type [private] |
Referenced by CompBindings(), and getType().
The documentation for this class was generated from the following files: