public AdaptationFunction(TransportTerminalFunction ttf)
        {
            Ttf = ttf;
            Builder = new FrameBuilder();
            Ttf.HandleInputFrame += new HandleInputFrame(GetDataFromFrame);

            this.Streams = new List<StreamData>();

            Dictionary<int, StmLevel> portsLevels = Ttf.GetPorts();
            OutputCredentials = new Dictionary<int, IFrame>();

            foreach (int portNumber in portsLevels.Keys)
            {
                OutputCredentials.Add(portNumber, new Frame(portsLevels[portNumber]));
            }
        }
        public HigherOrderPathConnection(TransportTerminalFunction ttf)
        {
            this.ForwardingTable = new Dictionary<int, List<ForwardingRecord>>();
            this.ttf = ttf;
            this.ttf.HandleInputFrame += new HandleInputFrame(HandleIncomFrame);
            Builder = new FrameBuilder();
            InputCredentials = new Dictionary<int, IFrame>();
            OutputCredentials = new Dictionary<int, IFrame>();
            Connections = new List<ForwardingRecord>();

            Dictionary<int,StmLevel> allPorts = ttf.GetPorts();

            foreach (int port in allPorts.Keys)
            {
                InputCredentials.Add(port, new Frame(allPorts[port]));
                OutputCredentials.Add(port, new Frame(allPorts[port]));
            }
        }