public override void processMessage(D2LogicalModel d2LogicalModel)
        {
            if (logWrapper.isDebug())
            {
                logWrapper.Debug("FusedSensorOnlyData Update");
            }

            fusedSensorOnlyDataStore.clearDataStore();

            ElaboratedDataPublication elaboratedDataPublication = (ElaboratedDataPublication)d2LogicalModel.payloadPublication;

            if (elaboratedDataPublication != null)
            {
                DateTime         publicationTime    = elaboratedDataPublication.publicationTime;
                DateTime         timeDefault        = elaboratedDataPublication.timeDefault;
                ElaboratedData[] elaboratedDataList = elaboratedDataPublication.elaboratedData;

                if (logWrapper.isDebug())
                {
                    logWrapper.Debug("FusedSensorOnlyData Update(" + elaboratedDataList.Length + " objects)");
                }

                for (int elaboratedDataListPos = 0; elaboratedDataListPos < elaboratedDataList.Length; elaboratedDataListPos++)
                {
                    ElaboratedData elaboratedData = elaboratedDataList[elaboratedDataListPos];
                    processSituation(elaboratedData, publicationTime, timeDefault);
                }
            }

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("FusedSensorOnlyData Update Complete");
            }
        }
Exemplo n.º 2
0
        private void processVmsUnitRecord(VmsUnitRecord vmsUnitRecord, DateTime publicationTime, String vmsUnitTableId)
        {
            String vmsUnitIdentifier = vmsUnitRecord.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing VMS Identifier(" + vmsUnitIdentifier + ")");
            }

            switch (vmsUnitTableId)
            {
            case "NTIS_Matrix_Units":
                MatrixSignalStaticData matrixSignalStaticData = new MatrixSignalStaticData(vmsUnitIdentifier, publicationTime, vmsUnitRecord);
                matrixSignalStaticDataStore.updateData(matrixSignalStaticData);
                break;

            case "NTIS_VMS_Units":
                VMSStaticData vmsStaticData = new VMSStaticData(vmsUnitIdentifier, publicationTime, vmsUnitRecord);
                vmsStaticDataStore.updateData(vmsStaticData);
                break;

            default:
                logWrapper.Error("VMS Unit Table Id not implemented: " + vmsUnitTableId);
                break;
            }
        }
        private void processSituation(SiteMeasurements siteMeasurements, DateTime publicationTime)
        {
            String midasIdentifier = siteMeasurements.measurementSiteReference.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing MIDAS Identifier(" + midasIdentifier + ")");
            }

            MIDASData midasData = new MIDASData(midasIdentifier, publicationTime, siteMeasurements);

            midasDataStore.updateData(midasData);
        }
        private void processSituation(Situation situation, DateTime publicationTime, bool fullRefresh)
        {
            String eventIdentifier = situation.situationRecord[0].situationRecordCreationReference;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing Event Identifier(" + eventIdentifier + ")");
            }

            EventData eventData = new EventData(eventIdentifier, publicationTime, situation);

            lock (eventDataStore){
                eventDataStore.updateData(eventData);
            }
        }
        private void processPredefinedLocation(PredefinedLocation predefinedLocation, DateTime publicationTime, string predefinedLocationContainerId)
        {
            string predefinedLocationIdentifier = predefinedLocation.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing Predefined Location Identifier(" + predefinedLocationIdentifier + ")");
            }

            if (predefinedLocationContainerId.Equals("NTIS_Network_Links"))
            {
                NwkLinkStaticData nwkLinkStaticData = new NwkLinkStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                nwkLinkStaticDataStore.updateData(nwkLinkStaticData);
            }
            else if (predefinedLocationContainerId.Equals("NTIS_Network_Nodes"))
            {
                NwkNodeStaticData nwkNodeStaticData = new NwkNodeStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                nwkNodeStaticDataStore.updateData(nwkNodeStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_Link_Shape_"))
            {
                LinkShapeStaticData linkShapeStaticData = new LinkShapeStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                linkShapeStaticDataStore.updateData(linkShapeStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_ANPR_Route_"))
            {
                ANPRRouteStaticData anprRouteStaticData = new ANPRRouteStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                anprRouteStaticDataStore.updateData(anprRouteStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_HATRIS_Section_"))
            {
                HATRISSectionStaticData hatrisSectionStaticData = new HATRISSectionStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                hatrisSectionStaticDataStore.updateData(hatrisSectionStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_Alternate_Route_"))
            {
                AlternateRouteStaticData alternateRouteStaticData = new AlternateRouteStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                alternateRouteStaticDataStore.updateData(alternateRouteStaticData);
            }
            else
            {
                logWrapper.Error("Predefined Location Container not implemented: " + predefinedLocationContainerId);
            }
        }
Exemplo n.º 6
0
        private void processMeasurementSiteRecord(MeasurementSiteRecord measurementSiteRecord, DateTime publicationTime, string measurementSiteTableId)
        {
            String measurementSiteRecordIdentifier = measurementSiteRecord.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing Measurement Site Identifier(" + measurementSiteRecordIdentifier + ")");
            }

            switch (measurementSiteTableId)
            {
            case "NTIS_TAME_Measurement_Sites":
                TAMEStaticData tameStaticData = new TAMEStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                tameStaticDataStore.updateData(tameStaticData);
                break;

            case "NTIS_MIDAS_Measurement_Sites":
                MIDASStaticData midasStaticData = new MIDASStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                midasStaticDataStore.updateData(midasStaticData);
                break;

            case "NTIS_ANPR_Measurement_Sites":
                ANPRStaticData anprStaticData = new ANPRStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                anprStaticDataStore.updateData(anprStaticData);
                break;

            case "NTIS_TMU_Measurement_Sites":
                TMUStaticData tmuStaticData = new TMUStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                tmuStaticDataStore.updateData(tmuStaticData);
                break;

            default:
                logWrapper.Error("VMS Unit Table Id not implemented: " + measurementSiteTableId);
                break;
            }
        }