Newer
Older
SensorHub / SensorHub.WasteGas / SewTiming.cs
root on 17 Sep 2021 973 bytes first commit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketBase.Command;
using SuperSocket.SocketBase.Protocol;

namespace SensorHub.WasteGas
{
    public class SewTiming : CommandBase<WGSession, StringRequestInfo>
    {
        public override void ExecuteCommand(WGSession session, StringRequestInfo requestInfo)
        {
            try
            {
                session.Logger.Info("有害气体监测仪校时回复:" + requestInfo.Body);

                string[] bt = requestInfo.Body.Split(',');
                if (string.IsNullOrEmpty(session.MacID))
                {
                    session.MacID = bt[0];
                }
            }
            catch (Exception e)
            {
                session.Logger.Info("有害气体监测仪校时异常!");
                session.Logger.Info(requestInfo.Body);
                session.Logger.Error(e.ToString());
            }
        }
    }
}