예제 #1
0
 public NetworkNode()
 {
     this.commutationTable           = new CommutationTable();
     this.borderNodeCommutationTable = new BorderNodeCommutationTable();
     this.eonTable         = new EONTable();
     this.commutationField = new CommutationField(ref borderNodeCommutationTable, ref commutationTable, ref eonTable, 1);
 }
 /// <summary>
 /// Konstruktor z referencjami na tablice i liczba wyjsciowych buforow
 /// </summary>
 /// <param name="borderNodeCommutationTable"></param>
 /// <param name="commutationTable"></param>
 /// <param name="EonTable"></param>
 public CommutationField(ref BorderNodeCommutationTable borderNodeCommutationTable,
     ref CommutationTable commutationTable, ref EONTable EonTable, int buffersOutCount) : this()
 {
     //bufferIn = new Buffer();
     // BuffersOut = new List<Buffer>(buffersOutCount);
     this.borderNodeCommutationTable = borderNodeCommutationTable;
     this.EonTable = EonTable;
     this.commutationTable = commutationTable;
 }
예제 #3
0
        public void testAddCommutationTableRow()
        {
            short frequency_in  = 2;
            short port_in       = 3;
            short frequency_out = 4;
            short port_out      = 5;

            //stworzenie nowego rzedu
            CommutationTableRow row = new CommutationTableRow(frequency_in, port_in, frequency_out, port_out);

            //stworzenie nowej tablicy komutacji
            CommutationTable table = new CommutationTable();

            //dodanie nowegor rzedu do tablicy komutacji
            table.Table.Add(row);

            //Powinny byc takie same
            Assert.AreEqual(table.Table[0].frequency_out, frequency_out);
            Assert.AreEqual(table.Table[0].port_out, port_out);
            Assert.AreEqual(table.Table[0].frequency_in, frequency_in);
            Assert.AreEqual(table.Table[0].port_in, port_in);
        }
예제 #4
0
        public void Run(string number, ref CommutationTable commutationTable,
                        ref BorderNodeCommutationTable borderNodeCommutationTable,
                        ref EONTable eonTable)
        {
            this.eonTable                   = eonTable;
            this.commutationTable           = commutationTable;
            this.borderNodeCommutationTable = borderNodeCommutationTable;
            //Zmienna do przechowywania klucza na adres wychodzacy powiazany z socketem sluchaczem
            string settingsString = "";


            //pobranie wlasnosci zapisanych w pliku konfiguracyjnym
            tmp = OperationConfiguration.ReadAllSettings(mySettings);


            //przeszukanie wszystkich kluczy w liscie


            //Uruchamiamy watek na kazdym z tworzonych sluchaczy


            //    CreateConnect("127.0.0.14","1NMS");
            CreateConnect(ConfigurationManager.AppSettings[number + "NMS"], number + "NMS");



            ConsoleKeyInfo cki;

            while (true)
            {
                cki = Console.ReadKey();
                if (cki.Key == ConsoleKey.Escape)
                {
                    break;
                }
            }
        }