| | |
| | | public class ZbGatewayData |
| | | { |
| | | #region 一堆变量 |
| | | /// <summary> |
| | | /// 判断网关是否在线的标识,APP界面会改变它的值,Application会重新刷新它的值 |
| | | /// </summary> |
| | | public bool GatewayOnlineFlage = false; |
| | | |
| | | /// <summary>
|
| | | /// 网关所在的房间ID
|
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string RoomId = string.Empty; |
| | | public string HomeId = string.Empty; |
| | | ///<summary> |
| | | ///网关序列号,该网关唯一标识 |
| | | /// </summary> |
| | | public string GwId = string.Empty;
|
| | | /// <summary> |
| | | ///网关绑定网卡的mac地址 |
| | | /// </summary> |
| | | public string GwMac = string.Empty; |
| | | /// <summary> |
| | | ///网关名称 |
| | | /// </summary> |
| | | public string GwName = string.Empty; |
| | | /// <summary> |
| | | /// 网关的序列号 |
| | | /// </summary> |
| | | public string GwSerialNum = string.Empty; |
| | | /// <summary> |
| | | ///是否为主网关。(因为在外网的情况下,这个字段可以获取到,用来更新局域网中基本信息的对象中的主网关信息) |
| | | ///<para>0:否</para> |
| | | ///<para>1:是</para> |
| | | /// </summary> |
| | | public bool IsMainGateWay; |
| | | /// <summary> |
| | | ///网关所在局域网的ip地址 |
| | | /// </summary> |
| | | public string GwIP = string.Empty; |
| | | /// <summary> |
| | | /// 该网关应用程序版本(网关固件日期??) |
| | | /// </summary> |
| | | public long GwVersionDate = 0; |
| | | /// <summary> |
| | | ///Linux网关类型(也叫网关镜像类型) |
| | | /// </summary> |
| | | public int LinuxImageType = -1; |
| | | /// <summary> |
| | | ///Linux网关硬件版本 |
| | | /// </summary> |
| | | public int LinuxHardVersion = -1; |
| | | /// <summary> |
| | | /// Linux网关固件版本 |
| | | /// </summary> |
| | | public int LinuxFirmwareVersion = -1; |
| | | /// <summary> |
| | | /// 协调器硬件版本 |
| | | /// </summary> |
| | | public int CoordinatorHardVersion = -1; |
| | | /// <summary> |
| | | /// 协调器固件版本 |
| | | /// </summary> |
| | | public int CoordinatorFirmwareVersion = -1; |
| | | /// <summary> |
| | | /// 协调器镜像ID |
| | | /// </summary> |
| | | public int CoordinatorImageId = -1; |
| | | /// <summary> |
| | | /// 虚拟驱动信息 |
| | | /// </summary> |
| | | public List<DriveCodeObj> DriveCodeList = new List<DriveCodeObj>(); |
| | | /// <summary> |
| | | /// 虚拟网关 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public DateTime LastDateTime = DateTime.MinValue; |
| | | /// <summary>
|
| | | /// 网关在线的时间点(这个东西有点用处,当第一次获取时,需要返回当前时间回去,然后才开始计时)
|
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | private DateTime m_OnlineTime = new DateTime(1970, 1, 1); |
| | | /// <summary> |
| | | /// 网关在线的时间点 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public DateTime OnlineTime
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_OnlineTime.Year == 1970)
|
| | | {
|
| | | //当第一次获取时,需要返回当前时间回去,然后才开始计时
|
| | | m_OnlineTime = DateTime.Now;
|
| | | }
|
| | | return m_OnlineTime;
|
| | | }
|
| | | set { m_OnlineTime = value; }
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 网关信息. |
| | | /// </summary> |
| | | public GetGwData getGwInfo; |
| | | /// <summary> |
| | | /// 网关信息(屏蔽掉了一些目前不使用的变量) |
| | | /// </summary> |
| | | [System.Serializable] |
| | |
| | | /// <summary> |
| | | ///网关绑定网卡的mac地址 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string GwMac; |
| | | /// <summary> |
| | | ///网关名称 |
| | |
| | | ///<summary> |
| | | ///utc时间戳,程序启动时网关的系统时间 |
| | | ///</summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public long StartTime;
|
| | | /// <summary> |
| | | ///加入局域网模式 |
| | |
| | | ///<para>1:有线连接局域网</para> |
| | | ///<para>2:未加入局域网</para> |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int JoinMode; |
| | | /// <summary> |
| | | ///网关所在局域网的ip地址 |
| | |
| | | /// <summary>
|
| | | /// 主人的Guid(即使是管理员,这里也是主人的Guid)
|
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string AccountId;
|
| | | /// <summary> |
| | | ///当前局域网网络号占用位数,用于计算子网掩码,如Mask=32,则子网掩码为255.255.255.0 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int Mask;
|
| | | /// <summary> |
| | | ///上级路由器无线名称 |
| | | ///<para>当 JoinMode = 0时存在 </para> |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string RouteESSID;
|
| | | /// <summary> |
| | | ///DNS服务器地址 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string DNSServer; |
| | | /// <summary> |
| | | /// 该网关应用程序版本(网关固件日期??) |
| | |
| | | /// <summary> |
| | | /// Zigbee协议器程序版本 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int ZigbeeVersion;
|
| | | /// <summary> |
| | | ///协调器mac地址 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string ZigbeeMacAddr;
|
| | | /// <summary> |
| | | ///网关宅id |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string HomeId;
|
| | | /// <summary> |
| | | ///是否已经连接云端mqtt |
| | | ///<para>0:否</para> |
| | | ///<para>1:是</para> |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int IsConnectCloud;
|
| | | /// <summary> |
| | | ///(用于网关程序调试) |
| | |
| | | ///<para>(3)NoBind,则响应字段中[ErrorInfo] 为错误信息[您所提交的[GatewayUniqueId 网关唯一Id(MAC)]和[住宅主键Id]不存在绑定的关系]</para> |
| | | ///<para>(4)YouDataNoIsLocalRegion,则响应字段中[ErrorInfo] 为错误信息[您的的数据并不在此HDL区域服务器, 请重定向到如下HDL区域服务器进行处理.]</para> |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string StateCode; |
| | | /// <summary> |
| | | ///Linux网关类型 |
| | |
| | | /// <summary> |
| | | /// 虚拟驱动信息 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public List<DriveCodeListObj> DriveCodeList = new List<DriveCodeListObj>(); |
| | | public List<DriveCodeObj> DriveCodeList = new List<DriveCodeObj>(); |
| | | }
|
| | |
|
| | | public class DriveCodeListObj |
| | | { |
| | | /// <summary> |
| | | /// 驱动代号(由网关为驱动分配唯一标识) |
| | | /// </summary> |
| | | public int DriveCode; |
| | | /// <summary> |
| | | /// 驱动硬件版本 |
| | | /// </summary> |
| | | public int DriveHwVersion; |
| | | /// <summary> |
| | | /// 驱动软件版 |
| | | /// </summary> |
| | | public int DriveFwVersion; |
| | | /// <summary> |
| | | /// 驱动固件类型 |
| | | /// </summary> |
| | | public int DriveImageType; |
| | | /// <summary> |
| | | /// 驱动id |
| | | /// </summary> |
| | | public int DriveId; |
| | | } |
| | | #endregion |
| | | |
| | | #region 修改网关名称 |
| | |
| | | public string HomeId; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 广播发现协议(屏蔽掉了一些目前不用的变量) |
| | | /// </summary> |
| | | public GatewayBaseInfo getGatewayBaseInfo = new GatewayBaseInfo(); |
| | | /// <summary> |
| | | /// 广播发现协议(屏蔽掉了一些目前不用的变量) |
| | | /// </summary> |