Go to the documentation of this file.
34 #include <boost/format.hpp>
58 std::string name,
ResourceBroker& fub,
unsigned int initiationInterval):
60 inputFUBroker_(fub), busBroker_(NULL) {
89 string msg =
"Broker not capable of assigning resources to node!";
112 for (
int i = 0; i < rf.
portCount(); i++) {
115 if (inputSocket != NULL) {
191 if (res != NULL && res->
isInUse(cycle) &&
236 string msg =
"Broker not capable of assigning resources to node!";
241 string msg =
"Broker does not contain given resource.";
251 for (
int i = 0; i < socket.
portCount(); i++) {
257 port = socket.
port(i);
264 "Broker does not have necessary Port registered!");
273 std::pair<const MoveNode*, SchedulingResource*>(&node,&res));
297 if ((MapTools::valueForKey<SchedulingResource*>(
300 "InputPSocketBroker: assigned resource changed!";
320 for (
int i = 0; i < navi.
count(); i++) {
322 if (socket->
direction() == Socket::INPUT) {
344 for (ResourceMap::iterator resIter =
resMap_.begin();
345 resIter !=
resMap_.end(); resIter++) {
348 dynamic_cast<const Socket*
>((*resIter).first);
352 "Broker does not have necessary Socket registered!");
356 for (
int i = 0; i < socket->
portCount(); i++) {
375 std::string msg =
"InputPSocketBroker: finding ";
376 msg +=
" resource for Segment ";
377 msg +=
" failed with error: ";
virtual bool isFUPort() const
virtual Socket * inputSocket() const
Port * port(int index) const
unsigned int initiationInterval_
virtual TCEString name() const
virtual int index() const
virtual const TTAMachine::RegisterFile & registerFile() const
virtual void unassign(const int cycle, MoveNode &node)=0
Terminal & destination() const
bool hasResource(const SchedulingResource &r) const
MoveResMap assignedResources_
Segment * segment(int index) const
Direction direction() const
void addResource(const TTAMachine::MachinePart &mp, SchedulingResource *res)
void setResourceMapper(const ResourceMapper &mapper)
void setDestination(Terminal *dst)
virtual void assign(const int cycle, MoveNode &node)=0
#define abortWithError(message)
virtual void addToRelatedGroup(const int group, SchedulingResource &resource)
virtual bool isGPR() const
std::string errorMessageStack(bool messagesOnly=false) const
SchedulingResource * resourceOf(const TTAMachine::MachinePart &mp) const
virtual bool isInUse(const int cycle) const =0
virtual SocketNavigator socketNavigator() const
virtual int portCount() const
TTAProgram::Move & move()
virtual RFPort * port(const std::string &name) const
virtual bool canAssign(const int cycle, const MoveNode &node) const =0
unsigned int instructionIndex(unsigned int) const
virtual const TTAMachine::MachinePart & machinePartOf(const SchedulingResource &r) const
virtual const TTAMachine::Port & port() const
ComponentType * item(int index) const
void insert(SchedulingResource &resource)
Unit * parentUnit() const