コード例 #1
0
        private void CommuteFrame(int input, IFrame frame, Dictionary <int, IFrame> outputFrames)
        {
            if (!ForwardingTable.ContainsKey(input))
            {
                return;
            }

            List <ForwardingRecord> forwardingRules = ForwardingTable[input];

            foreach (ForwardingRecord record in forwardingRules)
            {
                if (!outputFrames.ContainsKey(record.OutputPort))
                {
                    Dictionary <int, StmLevel> portStmLevels = this.ttf.GetPorts();
                    StmLevel outputFrameLevel = portStmLevels[record.OutputPort];
                    outputFrames.Add(record.OutputPort, new Frame(outputFrameLevel));
                }

                IFrame   outputFrame = outputFrames[record.OutputPort];
                IContent vContainer  = frame.GetVirtualContainer(record.ContainerLevel, record.HigherPathIn, record.VcNumberIn == -1 ? null : (int?)record.VcNumberIn);

                outputFrame.SetVirtualContainer(record.ContainerLevel, record.HigherPathOut, record.VcNumberOut, vContainer);
            }
        }
コード例 #2
0
        private void CommuteFrame(int input, IFrame frame, Dictionary<int, IFrame> outputFrames)
        {
            if (!ForwardingTable.ContainsKey(input))
            {
                return;
            }

            List<ForwardingRecord> forwardingRules = ForwardingTable[input];

            foreach (ForwardingRecord record in forwardingRules)
            {
                if (!outputFrames.ContainsKey(record.OutputPort))
                {
                    Dictionary<int, StmLevel> portStmLevels = this.ttf.GetPorts();
                    StmLevel outputFrameLevel = portStmLevels[record.OutputPort];
                    outputFrames.Add(record.OutputPort, new Frame(outputFrameLevel));
                }

                IFrame outputFrame = outputFrames[record.OutputPort];
                IContent vContainer = frame.GetVirtualContainer(record.ContainerLevel, record.HigherPathIn, record.VcNumberIn == -1 ? null : (int?) record.VcNumberIn);

                outputFrame.SetVirtualContainer(record.ContainerLevel, record.HigherPathOut, record.VcNumberOut, vContainer);
            }
        }