Go to the documentation of this file.
74 const string procName =
"Port::Port";
103 const string procName =
"Port::Port";
105 format errorMsg = textGenerator.
text(
109 __FILE__, __LINE__, procName, errorMsg.str());
160 const string procName =
"Port::setName";
167 for (
int i = 0; i < parent->
portCount(); i++) {
193 string procName =
"Port::attachSocket";
203 __FILE__, __LINE__, procName, errorMsg);
243 string procName =
"Port::detachSocket";
324 const string procName =
"Port::unconnectedSocket";
326 if (index < 0 || index > 1) {
327 throw OutOfRange(__FILE__, __LINE__, procName);
359 string errorMsg =
"Too many sockets attached to a port.";
435 const string procName =
"Port::loadStateWithoutReferences";
445 __FILE__, __LINE__, procName, exception.
errorMessage());
460 const string procName =
"Port::loadState";
463 string socketName =
"";
476 format errorMsg = textGenerator.
text(
480 __FILE__, __LINE__, procName, errorMsg.str());
482 format errorMsg = textGenerator.
text(
486 __FILE__, __LINE__, procName, errorMsg.str());
488 format errorMsg = textGenerator.
text(
492 __FILE__, __LINE__, procName, errorMsg.str());
495 __FILE__, __LINE__, procName, exception.
errorMessage());
517 const string procName =
"Socket::attachSocket";
550 const std::pair<const Port*, const Port*>& pp1,
551 const std::pair<const Port*, const Port*>& pp2)
virtual Socket * unconnectedSocket(int index) const
virtual bool canConnect(const TTAMachine::Socket &socket, const TTAMachine::Segment &segment)
bool hasAttribute(const std::string &name) const
Port(const std::string &name, Unit &parentUnit)
virtual Socket * inputSocket() const
void attachPort(Port &port)
virtual TCEString name() const
std::string stringAttribute(const std::string &name) const
virtual ObjectState * saveState() const
@ OUTPUT
Data goes from port to bus.
bool operator()(const std::pair< const Port *, const Port * > &pp1, const std::pair< const Port *, const Port * > &pp2) const
virtual void removePort(Port &port)
virtual void ensureRegistration(const Component &component) const
static void writeToErrorLog(const std::string fileName, const int lineNumber, const std::string functionName, const std::string message, const int neededVerbosity=0)
static const std::string OSKEY_SECOND_SOCKET
ObjectState attribute key for the name of the other connected socket.
virtual boost::format text(int textId)
Direction direction() const
static const std::string OSNAME_PORT
ObjectState name for Port.
static std::string socketPortConnectionError(const TTAMachine::Socket &socket, const TTAMachine::Port &port, const MachineTester &tester)
virtual int socketCount() const
std::string name_
Name of the port.
virtual void setName(const std::string &name)
virtual void loadState(const ObjectState *state)
#define assert(condition)
virtual void attachSocket(Socket &socket)
void detachPort(const Port &port)
MachineTester & machineTester() const
virtual Port * port(const std::string &name) const
virtual void detachSocket(Socket &socket)
Unit * parentUnit_
Parent unit.
static bool isValidComponentName(const std::string &name)
virtual SocketNavigator socketNavigator() const
virtual bool isOutput() const
virtual int portCount() const
std::string errorMessage() const
bool connectionExists() const
Socket * socket2_
Connection to the second socket.
Socket * socket1_
Connection to the first socket.
virtual Machine * machine() const
virtual std::string name() const
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the port.
void loadStateWithoutReferences(const ObjectState *state)
@ UNKNOWN
Unknown direction.
virtual Socket * outputSocket() const
virtual bool isInput() const
@ TXT_PORT_REF_LOAD_ERR_SOCKET
ComponentType * item(int index) const
virtual bool isConnectedTo(const Socket &socket) const
static void abortProgram() __attribute__((noreturn))
virtual void detachAllSockets()
@ TXT_PORT_EXISTS_BY_NAME
void setAttribute(const std::string &name, const std::string &value)
@ INPUT
Data goes from bus to port.
static const std::string OSKEY_FIRST_SOCKET
ObjectState attribute key for the name of the connected socket.
Unit * parentUnit() const