| | |
| | | public class ZbGatewayData |
| | | { |
| | | #region 一堆变量 |
| | | /// <summary> |
| | | /// 网关在线的时间点 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public DateTime OnlineTime = DateTime.Now; |
| | | |
| | | /// <summary>
|
| | | /// 住宅ID |
| | | /// </summary> |
| | |
| | | ///<summary> |
| | | ///网关序列号,该网关唯一标识 |
| | | /// </summary> |
| | | public string GwId = string.Empty; |
| | | public string GwId = string.Empty;
|
| | | /// <summary> |
| | | ///网关绑定网卡的mac地址 |
| | | /// </summary> |
| | |
| | | /// 最后的更新时间 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public DateTime LastDateTime = DateTime.MinValue; |
| | | 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 |
| | | |