示例#1
0
        protected override void ProcessInternal(CustomBinaryReader reader)
        {
            uint year  = reader.ReadBCDString(2);
            uint month = reader.ReadBCDString(1);
            uint day   = reader.ReadBCDString(1);

            // year 0, month 0, day 0 means date isn't set
            if (year > 0 || month > 0 || day > 0)
            {
                dateTime = new DateTime((int)year, (int)month, (int)day);
            }
        }
示例#2
0
        protected override void ProcessInternal(CustomBinaryReader reader, XmlWriter writer)
        {
            uint year  = reader.ReadBCDString(2);
            uint month = reader.ReadBCDString(1);
            uint day   = reader.ReadBCDString(1);

            string dateTimeString = null;

            // year 0, month 0, day 0 means date isn't set
            if (year > 0 || month > 0 || day > 0)
            {
                dateTime       = new DateTime((int)year, (int)month, (int)day);
                dateTimeString = dateTime.ToString("u");
            }

            writer.WriteAttributeString("Datef", dateTimeString);
        }
        protected override void ProcessInternal(CustomBinaryReader reader)
        {
            serialNumber = reader.ReadSInt32();
            // BCD coding of Month (two digits) and Year (two last digits)
            uint monthYear = reader.ReadBCDString(2);

            type             = reader.ReadByte();
            manufacturerCode = reader.ReadByte();

            month = (byte)(monthYear / 100);
            year  = (byte)(monthYear % 100);
        }
示例#4
0
        protected override void ProcessInternal(CustomBinaryReader reader, XmlWriter writer)
        {
            serialNumber = reader.ReadSInt32();
            // BCD coding of Month (two digits) and Year (two last digits)
            uint monthYear = reader.ReadBCDString(2);

            type             = reader.ReadByte();
            manufacturerCode = reader.ReadByte();

            month = (byte)(monthYear / 100);
            year  = (byte)(monthYear % 100);

            writer.WriteAttributeString("Month", month.ToString());
            writer.WriteAttributeString("Year", year.ToString());
            writer.WriteAttributeString("Type", type.ToString());
            writer.WriteAttributeString("ManufacturerCode", manufacturerCode.ToString());

            writer.WriteString(serialNumber.ToString());
        }
示例#5
0
        protected override void ProcessInternal(CustomBinaryReader reader)
        {
            previousRecordLength = reader.ReadSInt16();
            currentRecordLength  = reader.ReadSInt16();
            recordDate           = reader.ReadTimeReal();
            dailyPresenceCounter = reader.ReadBCDString(2);
            distance             = reader.ReadSInt16();

            uint recordCount = (currentRecordLength - 12) / 2;

            this.ProcessedRegions.Capacity = (int)recordCount;

            WriteLine(LogLevel.DEBUG, "Reading {0} activity records", recordCount);

            while (recordCount > 0)
            {
                ActivityChangeRegion acr = new ActivityChangeRegion();
                acr.Name = "ActivityChangeInfo";
                acr.Process(reader);
                this.ProcessedRegions.Add(acr);
                recordCount--;
            }
        }
示例#6
0
        protected override void ProcessInternal(CustomBinaryReader reader, XmlWriter writer)
        {
            previousRecordLength = reader.ReadSInt16();
            currentRecordLength  = reader.ReadSInt16();
            recordDate           = reader.ReadTimeReal();
            dailyPresenceCounter = reader.ReadBCDString(2);
            distance             = reader.ReadSInt16();

            writer.WriteAttributeString("DateTime", recordDate.ToString("u"));
            writer.WriteAttributeString("DailyPresenceCounter", dailyPresenceCounter.ToString());
            writer.WriteAttributeString("Distance", distance.ToString());

            uint recordCount = (currentRecordLength - 12) / 2;

            WriteLine(LogLevel.DEBUG, "Reading {0} activity records", recordCount);

            while (recordCount > 0)
            {
                ActivityChangeRegion acr = new ActivityChangeRegion();
                acr.Name = "ActivityChangeInfo";
                acr.Process(reader, writer);
                recordCount--;
            }
        }
示例#7
0
 protected override void ProcessInternal(CustomBinaryReader reader, XmlWriter writer)
 {
     value = reader.ReadBCDString(Size);
     writer.WriteString(value.ToString());
 }
 protected override void ProcessInternal(CustomBinaryReader reader)
 {
     value = reader.ReadBCDString(Size);
 }