Esempio n. 1
0
        public void DealPacket_ChainInfo(object pack)
        {
            RD_ChainInfo rd = (RD_ChainInfo)pack;

            if (rd.StartOrEnd == "s")
            {
                chain_path temp = new chain_path(this);
                temp.sensor_name = rd.id;
                temp.path        = rd.PathNodes;
                foreach (var o in rd.PathNodes)
                {
                    temp.path_Objs.Add(Scenemana.stkObjs.Find(c => c.ObjName == o));
                }
                Scenemana.setupchain(temp);
                Scenemana.all_path.Add(temp);
            }
            else if (rd.StartOrEnd == "e")
            {
                //清楚掉链路
                chain_path temp;
                temp = Scenemana.all_path.Find(c => c.sensor_name == rd.id);
                if (temp != null)
                {
                    Scenemana.RemoveAllSensorOnPath(temp);
                    Scenemana.all_path.Remove(temp);
                }
                else
                {
                    MessageBox.Show("读取链路记录异常");
                }
            }
        }
Esempio n. 2
0
        public void DealPacket_ChainInfo(object pack)
        {
            RD_ChainInfo rd = (RD_ChainInfo)pack;
            //建立链路
            chain_path temp = new chain_path(this);

            temp.sensor_name = rd.id;
            temp.path        = rd.PathNodes;
            foreach (var o in rd.PathNodes)
            {
                temp.path_Objs.Add(Scenemana.stkObjs.Find(c => c.ObjName == o));
            }
            //beamdiameter = 103;
            Scenemana.setupchain(temp, beamdiameter);
            Scenemana.all_path.Add(temp);
        }