Пример #1
0
        private DateTime GetEntryTimestamp(byte[] tripEntry)
        {
            var timestamp = DateTime.Parse("01.01.1970 00:00");
            var rawTime   = tripEntry.SubArray(1, 8);

            var msTimestamp = ValueParser.ParseInt64(rawTime);

            timestamp = timestamp.AddMilliseconds(msTimestamp);

            return(timestamp);
        }
Пример #2
0
        private int GetValue(byte[] tripEntry)
        {
            var rawValue = tripEntry.SubArray(11, 4);

            return(ValueParser.ParseInt32(rawValue));
        }
Пример #3
0
        private SignalMap GetSignal(byte[] tripEntry)
        {
            var parsedId = ValueParser.ParseDataId(tripEntry.SubArray(9, 2));

            return(_signals.FirstOrDefault(sm => sm.SignalId == parsedId));
        }