def getValue(self):
return self.getCCObject()
+ @cxxMethod(return_value_policy="reference")
+ def getPort(self, if_name, idx):
+ pass
+
# Create C++ port connections corresponding to the connections in
# _port_refs
def connectPorts(self):
return probeManager;
}
+Port &
+SimObject::getPort(const std::string &if_name, PortID idx)
+{
+ fatal("%s does not have any port named %s\n", name(), if_name);
+}
+
//
// static function: serialize all SimObjects.
//
#include "sim/drain.hh"
#include "sim/eventq.hh"
#include "sim/eventq_impl.hh"
+#include "sim/port.hh"
#include "sim/serialize.hh"
class EventManager;
*/
ProbeManager *getProbeManager();
+ /**
+ * Get a port with a given name and index. This is used at binding time
+ * and returns a reference to a protocol-agnostic port.
+ *
+ * @param if_name Port name
+ * @param idx Index in the case of a VectorPort
+ *
+ * @return A reference to the given port
+ */
+ virtual Port &getPort(const std::string &if_name,
+ PortID idx=InvalidPortID);
+
/**
* startup() is the final initialization call before simulation.
* All state is initialized (including unserialized state, if any,