--- a/src/Common/Flow.h
+++ b/src/Common/Flow.h
@@ -35,15 +35,21 @@
Flow(APNamingInfo src, APNamingInfo dst);
virtual ~Flow();
- //TODO: VV - Completely missing overloading of < and > operators
-
- bool operator== (const Flow& other);
+ bool operator== (const Flow& other) const;
virtual Flow* dup() const;
std::string info() const;
+ std::string infoSource() const;
+ std::string infoDestination() const;
+ std::string infoOther() const;
+ std::string infoQoS() const;
- ConnectionId& getConId();
+ std::string getFlowName() const;
+ Flow& swapFlow();
+
+ ConnectionId& getConnectionId();
+ const ConnectionId& getConId() const;
void setConId(const ConnectionId& conId);
uint32_t getCreateFlowRetries() const;
void setCreateFlowRetries(uint32_t createFlowRetries);
@@ -66,7 +72,13 @@
const QosCube& getQosParameters() const;
void setQosParameters(const QosCube& qosParameters);
- private:
+ const Address& getDstNeighbor() const;
+ void setDstNeighbor(const Address& dstNeighbor);
+ const Address& getSrcNeighbor() const;
+ void setSrcNeighbor(const Address& srcNeighbor);
+
+
+ protected:
//Properties are based on RINA-Demo-2012-001.pdf page 6
APNamingInfo srcApni;
APNamingInfo dstApni;
@@ -74,13 +86,24 @@
int dstPortId;
Address srcAddr;
Address dstAddr;
+
+ //TODO: Vesely - Pull neighbor addresses to child class
+ Address srcNeighbor;
+ Address dstNeighbor;
+
ConnectionId conId;
uint32_t createFlowRetries;
uint32_t maxCreateFlowRetries;
uint32_t hopCount;
QosCube qosParameters;
+
+ void swapPortIds();
+ void swapAddresses();
+ void swapCepIds();
+ void swapApni();
};
+
//Free function
std::ostream& operator<< (std::ostream& os, const Flow& fl);