using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Rdh.SocketServer.Client.Models
{
    /// <summary>
    /// 服务端返回时钟的数据协议类
    /// </summary>
    public class ClockResponseProtocol : EleMedKitProtocol
    {
        public ClockResponseProtocol()
        {
            base.Command = EleMedKitCommand.RepsonseClock;
            CountFlag = 1.ToString();
        }
        public override string GetContent()
        {
            DateTime now = DateTime.Now;
            return base.GetContent()
                + AddLineContent(now.ToString("yy")
                    + AddBlockContent(now.ToString("MM"))
                    + AddBlockContent(now.ToString("dd"))
                    + AddBlockContent(now.ToString("HH"))
                    + AddBlockContent(now.ToString("mm"))
                    + AddBlockContent(now.ToString("ss")))
                + AddLineContent(CountFlag);
        }
    }
}
