Beispiel #1
0
        protected void PublishValues()
        {
            var segment = new InferredMessageSegment()
            {
                Pid           = PublishedPID,
                ParseStatus   = Enums.Parsing.ParseStatus.Parsed,
                TimeParsed    = DateTime.Now,
                TimeReceived  = DateTime.Now,
                StandardValue = Value,
                MetricValue   = Value,
            };
            var e = new VMSParsedDataEventArgs(PublishedPID, segment);

            PublishEvent(e);
        }
Beispiel #2
0
 private void PublishNewDataEvent(CanMessage message)
 {
     foreach (var segment in message.CanMessageSegments)
     {
         if (segment.ParseStatus == ParseStatus.Parsed)
         {
             segment.TimeParsed = DateTime.Now;
             var e = new VMSParsedDataEventArgs(segment.Pid, segment);
             RaiseVMSEvent?.Invoke(this, e);
         }
         else
         {
             PublishUnparsedData(segment);
         }
     }
 }