| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using Edge.Core.Parser.BinaryParser.Attributes;
- using Edge.Core.Parser.BinaryParser.Util;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Censtar_31064V105OrV106_Pump.MessageEntity.Outgoing
- {
- public class SetDateAndTimeRequest : MessageBase
- {
- public SetDateAndTimeRequest(DateTime dateTime)
- {
- base.Cmd = 0x12;
- this.Year_Raw = (byte)(dateTime.Year - 2000);
- this.Month_Raw = (byte)dateTime.Month;
- this.Day_Raw = (byte)dateTime.Day;
- this.Hour_Raw = (byte)dateTime.Hour;
- this.Minute_Raw = (byte)dateTime.Minute;
- this.Second_Raw = (byte)dateTime.Second;
- }
- [Format(1, EncodingType.BCD, 0)]
- public byte Year_Raw { get; set; }
- [Format(1, EncodingType.BCD, 1)]
- public byte Month_Raw { get; set; }
- [Format(1, EncodingType.BCD, 2)]
- public byte Day_Raw { get; set; }
- [Format(1, EncodingType.BCD, 3)]
- public byte Hour_Raw { get; set; }
- [Format(1, EncodingType.BCD, 4)]
- public byte Minute_Raw { get; set; }
- [Format(1, EncodingType.BCD, 5)]
- public byte Second_Raw { get; set; }
- }
- }
|