Exemplo n.º 1
0
 //BMGR-0022 get route by route.orgSig = becon.input_orignsig
 private void UpdateRsList(List <RouteSegment> routeLst,GENERIC_SYSTEM_PARAMETERS.IMPLEMENTATION_BEACON_BLOCK_MODE.BM_BEACON beaconIbbm)
 {
     RsList.Clear();
     foreach (RouteSegment route in routeLst)//get route segment
     {
         if (route.m_OrgSig.ID == SignalInfo.ID)
         {
             RouteSegment newRoute = route.DeepClone();
             if (Sys.Reopening == m_ibbmIn.Type)//BMGR-0026 only reopen signal of the beacon use overlap
             {
                 newRoute.CalOverlap(beaconIbbm);
             }
             RsList.Add(newRoute);
         }
     }
 }
Exemplo n.º 2
0
        void test_generateRouteSegments()
        {
            Prepare.ReloadGlobalSydb(".//input//Routes_fromHHHT2.xml");
            RouteSegConfig SyDBRouteCfg = new RouteSegConfig(sydb);//this will call RouteSegConfig.generateRouteSegments()

            Debug.Assert(true == SyDBRouteCfg.generateRouteSegments());

            int count      = 0;
            int splitcount = 0;

            foreach (var r in sydb.routeInfoList)
            {
                if (r.IsValidBMRoute())
                {
                    RouteSegment route = SyDBRouteCfg.m_RouteSpacing_routeLst.Find(x => x.m_OrgSig.ID == r.Origin_Signal_ID && x.RouteInfo().ID == r.ID);
                    Debug.Assert(null != route);
                    ++count;
                    splitcount = splitcount + r.Spacing_Signal_ID_List.Signal_ID.Count;
                    foreach (int id in r.Spacing_Signal_ID_List.Signal_ID)
                    {
                        route = SyDBRouteCfg.m_Spacing_routeLst.Find(x => x.m_OrgSig.ID == id && x.RouteInfo().ID == r.ID);
                        Debug.Assert(null != route);
                    }


                    route.CalOverlap(null);

                    GENERIC_SYSTEM_PARAMETERS.SIGNALS.SIGNAL dstsig = (GENERIC_SYSTEM_PARAMETERS.SIGNALS.SIGNAL)MethodHelper.InvokePrivateMember(route,"DstSig");
                    if (null != dstsig.Overlap_ID)
                    {
                        Debug.Assert(null != route.m_overlap);
                    }
                    else
                    {
                        Debug.Assert(null == route.m_overlap);
                    }
                }
            }
            Debug.Assert(count == SyDBRouteCfg.m_RouteSpacing_routeLst.Count());
            Debug.Assert(splitcount == SyDBRouteCfg.m_Spacing_routeLst.Count());
        }