Newer
Older
SensorHub / SensorHub.Servers / JsonInfo.cs
root on 17 Sep 2021 1 KB first commit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SensorHub.Servers
{
    public class JsonInfo
    {
        public string mType { get; set; }   //消息类型
        public string devType { get; set; }     //设备类型
        public string devCode { get; set; }    //设备编号
        public Body mBody{ get; set; }    //业务消息体
        public long ts { get; set; }      //时间戳

        public JsonInfo(string mType, string devType, string devCode, Body mBody, long ts)
        {
            this.mType = mType;
            this.devType = devType;
            this.devCode = devCode;
            this.mBody = mBody;
            this.ts = ts;
        }
    }

    public class Body
    {
        public string bType { get; set; }   //业务类型
        public int cell { get; set; }   //电量
        public object datas { get; set; }   //数据
        public string logTime { get; set; }     //记录时间

        public Body(string bType, string logTime)
        {
            this.bType = bType;
            this.logTime = logTime;
        }

        public Body(string bType, int cell, object datas, string logTime)
        {
            this.bType = bType;
            this.cell = cell;
            this.datas = datas;
            this.logTime = logTime;
        }
    }
}