New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Newtonsoft.Json.Linq; |
| | | |
| | | namespace ZigBee.Device |
| | | { |
| | | public class ZbGatewayData |
| | | { |
| | | #region 一堆变量 |
| | | |
| | | /// <summary>
|
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string HomeId = string.Empty; |
| | | /// <summary> |
| | | /// 网关所在的房间ID
|
| | | /// </summary> |
| | | public string RoomId = 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> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public bool IsVirtual;
|
| | | /// <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 |
| | | |
| | | #region 网关信息. |
| | | /// <summary> |
| | | /// 网关版本信息,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetGwVersionAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 网关版本信息 |
| | | /// </summary> |
| | | public GetGwVersionData getGwVersion; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 网关版本信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetGwVersionData |
| | | { |
| | | /// <summary> |
| | | /// 该网关应用程序版本 |
| | | /// </summary> |
| | | public long AppVersion; |
| | | /// <summary> |
| | | /// Zigbee协议器程序版本 |
| | | /// </summary> |
| | | public int ZigbeeVersion; |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取网关信息. |
| | | |
| | | /// <summary> |
| | | /// 网关信息,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetGwAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 网关信息 |
| | | /// </summary> |
| | | public GetGwData getGwData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 网关信息(屏蔽掉了一些目前不使用的变量) |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetGwData |
| | | { |
| | | ///<summary> |
| | | ///网关序列号,该网关唯一标识 |
| | | /// </summary> |
| | | public string GwId;
|
| | | /// <summary> |
| | | ///网关绑定网卡的mac地址 |
| | | /// </summary> |
| | | public string GwMac; |
| | | /// <summary> |
| | | ///网关名称 |
| | | /// </summary> |
| | | public string GwName; |
| | | /// <summary>
|
| | | /// 网关的序列号
|
| | | /// </summary> |
| | | public string GWSN = string.Empty; |
| | | /// <summary> |
| | | ///是否为主网关。(因为在外网的情况下,这个字段可以获取到,用来更新局域网中基本信息的对象中的主网关信息) |
| | | ///<para>0:否</para> |
| | | ///<para>1:是</para> |
| | | /// </summary> |
| | | public int IsDominant;
|
| | | ///<summary> |
| | | ///utc时间戳,程序启动时网关的系统时间 |
| | | ///</summary> |
| | | public long StartTime;
|
| | | /// <summary> |
| | | ///加入局域网模式 |
| | | ///<para>0:wifi连接局域网</para> |
| | | ///<para>1:有线连接局域网</para> |
| | | ///<para>2:未加入局域网</para> |
| | | /// </summary> |
| | | public int JoinMode; |
| | | /// <summary> |
| | | ///网关所在局域网的ip地址 |
| | | /// </summary> |
| | | public string GwIP;
|
| | | /// <summary>
|
| | | /// 主人的Guid(即使是管理员,这里也是主人的Guid)
|
| | | /// </summary> |
| | | public string AccountId;
|
| | | /// <summary> |
| | | ///当前局域网网络号占用位数,用于计算子网掩码,如Mask=32,则子网掩码为255.255.255.0 |
| | | /// </summary> |
| | | public int Mask;
|
| | | /// <summary> |
| | | ///上级路由器无线名称 |
| | | ///<para>当 JoinMode = 0时存在 </para> |
| | | /// </summary> |
| | | public string RouteESSID;
|
| | | /// <summary> |
| | | ///DNS服务器地址 |
| | | /// </summary> |
| | | public string DNSServer; |
| | | /// <summary> |
| | | /// 该网关应用程序版本(网关固件日期??) |
| | | /// </summary> |
| | | public long AppVersion;
|
| | | /// <summary> |
| | | /// Zigbee协议器程序版本 |
| | | /// </summary> |
| | | public int ZigbeeVersion;
|
| | | /// <summary> |
| | | ///协调器mac地址 |
| | | /// </summary> |
| | | public string ZigbeeMacAddr;
|
| | | /// <summary> |
| | | ///网关宅id |
| | | /// </summary> |
| | | public string HomeId;
|
| | | /// <summary> |
| | | ///是否已经连接云端mqtt |
| | | ///<para>0:否</para> |
| | | ///<para>1:是</para> |
| | | /// </summary> |
| | | public int IsConnectCloud;
|
| | | /// <summary> |
| | | ///(用于网关程序调试) |
| | | ///<para>https登陆云端时,最近一次获取的响应状态码。根据云端的定义,有如下状态码。</para> |
| | | ///<para>(1)Success,则[调用此接口操作成功]</para> |
| | | ///<para>(2)ParameterOrEmpty,则响应字段中[ErrorInfo] 为错误信息[提交错误信息]</para> |
| | | ///<para>(3)NoBind,则响应字段中[ErrorInfo] 为错误信息[您所提交的[GatewayUniqueId 网关唯一Id(MAC)]和[住宅主键Id]不存在绑定的关系]</para> |
| | | ///<para>(4)YouDataNoIsLocalRegion,则响应字段中[ErrorInfo] 为错误信息[您的的数据并不在此HDL区域服务器, 请重定向到如下HDL区域服务器进行处理.]</para> |
| | | /// </summary> |
| | | public string StateCode; |
| | | /// <summary> |
| | | ///Linux网关类型 |
| | | /// </summary> |
| | | public int LinuxImageType; |
| | | /// <summary> |
| | | ///Linux网关HW版本 |
| | | /// </summary> |
| | | public int LinuxHWVersion; |
| | | /// <summary> |
| | | /// Linux网关FW版本 |
| | | /// </summary> |
| | | public int LinuxFWVersion; |
| | | /// <summary> |
| | | /// 协调器HW版本 |
| | | /// </summary> |
| | | public int ZbHWVersion; |
| | | /// <summary> |
| | | /// 协调器FW版本 |
| | | /// </summary> |
| | | public int ZbFWVersion; |
| | | /// <summary> |
| | | /// 网关镜像类型 |
| | | /// </summary> |
| | | public int ZbImageType;
|
| | | /// <summary> |
| | | /// 虚拟驱动信息 |
| | | /// </summary> |
| | | public List<DriveCodeObj> DriveCodeList = new List<DriveCodeObj>(); |
| | | }
|
| | |
|
| | | #endregion |
| | | |
| | | #region 修改网关名称 |
| | | /// <summary> |
| | | /// 修改网关名称,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwReNameAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 修改网关名称 |
| | | /// </summary> |
| | | public GwReNameData gwReNameData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改网关名称 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwReNameData |
| | | { |
| | | /// <summary> |
| | | /// 修改后的网关名称 |
| | | /// </summary> |
| | | public string GwName; |
| | | } |
| | | #endregion |
| | | |
| | | #region 设定网关住宅id |
| | | /// <summary> |
| | | /// 网关住宅id数据,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwSetHomeIdAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 网关住宅id数据 |
| | | /// </summary> |
| | | public GwSetHomeIdData gwSetHomeIdData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 网关住宅id数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwSetHomeIdData |
| | | { |
| | | /// <summary> |
| | | /// 住宅id |
| | | /// </summary> |
| | | public string HomeId; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 广播发现协议(屏蔽掉了一些目前不用的变量) |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GatewayBaseInfo |
| | | { |
| | | /// <summary> |
| | | /// 网关Ip地址 |
| | | /// </summary> |
| | | public string IpAddress; |
| | | /// <summary> |
| | | /// 住宅id,4字节整型。(小端结构)如果网关不设置宅id,将默认为0 |
| | | /// </summary> |
| | | public string HomeId = string.Empty;
|
| | | /// <summary> |
| | | /// 网关当前时间戳(小端结构) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int Time; |
| | | /// <summary> |
| | | /// 是否为主网关 |
| | | /// </summary> |
| | | public bool IsMainGateWay; |
| | | /// <summary> |
| | | /// 网关名称 |
| | | /// </summary> |
| | | public string GwName; |
| | | /// <summary> |
| | | /// 网关ID |
| | | /// </summary> |
| | | public string gwID; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 网关成为主网关时广播通知 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class MainGatewayBaseInfo |
| | | { |
| | | /// <summary> |
| | | /// 发送方的ip地址 |
| | | /// </summary> |
| | | public string IpAddress; |
| | | /// <summary> |
| | | /// 住宅id,4字节整型。(小端结构)如果网关不设置住宅id,将默认为0 |
| | | /// </summary> |
| | | public string HomeId; |
| | | /// <summary> |
| | | /// 数据命令标识 |
| | | /// </summary> |
| | | public int Command_Id = 0x03; |
| | | /// <summary> |
| | | /// 保留 |
| | | /// </summary> |
| | | public int Retain = 0x00; |
| | | /// <summary> |
| | | /// 网关当前时间戳(小端结构) |
| | | /// </summary> |
| | | public int Time; |
| | | /// <summary> |
| | | /// RSA公钥 |
| | | /// </summary> |
| | | public string PubKey; |
| | | /// <summary> |
| | | /// 网关名称 |
| | | /// </summary> |
| | | public string gwName; |
| | | |
| | | /// <summary> |
| | | /// 网关ID |
| | | /// </summary> |
| | | public string gwID; |
| | | |
| | | }
|
| | | #endregion |
| | |
|
| | | #region 网关恢复出厂设置 |
| | | /// <summary> |
| | | /// 网关恢复出厂设置返回的数据. |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwLinuxResetResponData : CommonDevice.ErrorResponCommon |
| | | { |
| | | ///<summary > |
| | | /// <para>0:命令已接收,系统即将恢复出厂并重启。</para> |
| | | /// </summary> |
| | | public int Result = 2; |
| | | } |
| | | #endregion |
| | | |
| | | #region 重启网关系统 |
| | | |
| | | /// <summary> |
| | | /// 重启网关系统返回数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwRebootResponAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | ///<summary > |
| | | /// <para>返回值是0:命令已接收,系统即将重启。</para> |
| | | /// </summary> |
| | | public int Result = 999; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重启网关系统返回数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwRebootResponData |
| | | { |
| | | ///<summary > |
| | | /// 0:命令已接收,系统即将重启。 |
| | | /// </summary> |
| | | public int Result = 999; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 网关和协调器升级 |
| | | /// <summary> |
| | | /// 保存zigbee协调器组网信息,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SaveNVFileResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 保存zigbee协调器组网信息 |
| | | /// </summary> |
| | | public SaveNVFileResponseData saveNVFileResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存zigbee协调器组网信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SaveNVFileResponseData |
| | | { |
| | | /// <summary> |
| | | /// 修改后的网关名称 |
| | | ///<para>0:保存成功</para> |
| | | ///<para>1:文件创建失败</para> |
| | | ///<para>2:NV分区读取出错 </para> |
| | | /// </summary> |
| | | public int Flag = 999; |
| | | } |
| | | #endregion |
| | | |
| | | #region 协调器恢复组网信息 |
| | | /// <summary> |
| | | /// 协调器恢复组网信息,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RestoreNVAllDtta : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 协调器恢复组网信息 |
| | | /// </summary> |
| | | public RestoreNVDtta restoreNVDtta; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 协调器恢复组网信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RestoreNVDtta |
| | | { |
| | | /// <summary> |
| | | /// 修改后的网关名称 |
| | | /// <para>0:恢复成功</para> |
| | | ///<para>1:文件不存在,恢复失败</para> |
| | | ///<para>2:NV分区写入错误,恢复失败</para> |
| | | ///<para>7:文件不合法</para> |
| | | /// </summary> |
| | | public int Flag = 999; |
| | | } |
| | | #endregion |
| | | |
| | | #region 协调器升级 |
| | | |
| | | /// <summary> |
| | | /// 下载进度 |
| | | /// </summary |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public CommonDevice.DownloadFileProgressResponData downloadFileProgressResponData = null; |
| | | /// <summary> |
| | | /// 启动升级 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public CommonDevice.OTAScheduleResponData oTAScheduleResponData = null; |
| | | |
| | | /// <summary> |
| | | /// 协调器升级,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ZbGwOperationUpgradeAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 协调器升级 |
| | | /// </summary> |
| | | public ZbGwOperationUpgradeData bGwOperationUpgradeData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 协调器升级 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public ZbGwOperationUpgradeData zbGwOperationUpgradeData; |
| | | /// <summary> |
| | | /// 协调器升级 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ZbGwOperationUpgradeData |
| | | { |
| | | /// <summary> |
| | | /// 修改后的网关名称 |
| | | /// <para>0:升级完成</para> |
| | | ///<para>1:没有找到升级文件,或升级文件打开失败。</para> |
| | | ///<para>2:正在升级</para> |
| | | ///<para>3:写入分区出错</para> |
| | | ///<para>7:升级文件不合法。</para> |
| | | ///<para>8:未知错误</para> |
| | | ///<para>9:升级文件名称中无“ZBMODULE”标识。</para> |
| | | /// </summary> |
| | | public int Flag = 999; |
| | | /// <summary> |
| | | /// 修改后的网关名称 |
| | | /// <para>升级进度。0-100表示0-100% ,该字段在Flag =2时才存在</para> |
| | | /// </summary> |
| | | public int Percent; |
| | | } |
| | | #endregion |
| | | |
| | | #region 升级虚拟驱动设备数据 |
| | | /// <summary> |
| | | /// 升级虚拟驱动设备,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class VirtualDriveUpgradeResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 升级虚拟驱动设备 |
| | | /// </summary> |
| | | public VirtualDriveUpgradeResponData virtualDriveUpgradeResponData; |
| | | } |
| | | /// <summary> |
| | | /// 升级虚拟驱动设备 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public VirtualDriveUpgradeResponData virtualDriveUpgradeResponData; |
| | | /// <summary> |
| | | /// 升级虚拟驱动设备 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class VirtualDriveUpgradeResponData |
| | | { |
| | | /// 0:升级完成 |
| | | ///<para>1:没有找到升级文件,或升级文件打开失败。v |
| | | ///<para>2:正在升级</para> |
| | | ///<para>3:写入分区出错</para> |
| | | ///<para>7:升级文件不合法。</para> |
| | | ///<para>8:未知错误</para> |
| | | ///<para>10:错误,驱动代号不存在</para> |
| | | public int Flag; |
| | | |
| | | /// <summary> |
| | | ///驱动代号 |
| | | /// </summary> |
| | | public int DriveCode; |
| | | |
| | | /// <summary> |
| | | ///升级进度。0-100表示0-100%(该字段在Flag =2时才有效) |
| | | /// </summary> |
| | | public int Percent; |
| | | } |
| | | #endregion |
| | | |
| | | #region 查看网关记录的虚拟驱动数据 |
| | | /// <summary> |
| | | /// 查看网关记录的虚拟驱动,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class CheckVDDriveCodeResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 查看网关记录的虚拟驱动 |
| | | /// </summary> |
| | | public VDriveDriveCodeResponData vDriveDriveCodeResponData; |
| | | } |
| | | /// <summary> |
| | | /// 查看网关记录的虚拟驱动 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class VDriveDriveCodeResponData |
| | | { |
| | | /// <summary> |
| | | /// 驱动代号列表 |
| | | /// </summary> |
| | | public List<DriveCodeObj> DriveCodeList = new List<DriveCodeObj>(); |
| | | } |
| | | /// <summary> |
| | | /// 虚拟驱动 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DriveCodeObj |
| | | { |
| | | /// <summary> |
| | | /// 驱动代号 |
| | | /// </summary> |
| | | public int DriveCode; |
| | | /// <summary> |
| | | /// 驱动硬件版本 |
| | | /// </summary> |
| | | public int DriveHwVersion; |
| | | /// <summary> |
| | | /// 驱动软件版本 |
| | | /// </summary> |
| | | public int DriveFwVersion; |
| | | /// <summary> |
| | | /// 驱动固件类型 |
| | | /// </summary> |
| | | public int DriveImageType; |
| | | /// <summary> |
| | | /// 驱动标识符 |
| | | /// </summary> |
| | | public int DriveId; |
| | | } |
| | | #endregion |
| | | |
| | | #region 网关系统升级 |
| | | /// <summary> |
| | | /// 网关系统升级,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class LinuxUpgradeAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 0:正常(默认回复) |
| | | ///<para>1:找不到升级固件,路径或升级固件名称错误。</para> |
| | | ///<para>2:固件不合法。(如果强制升级,则返回正常,Result=0)</para> |
| | | ///<para>3:升级固件过大(使用16MFlash时固件大小不得超过16449536B)</para> |
| | | ///<para>4:升级文件名称中无“LINUXMODULE”标识。</para> |
| | | ///</summary> |
| | | public int Result = 999; |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取协调器当前信道. |
| | | /// <summary> |
| | | /// 获取协调器当前信道,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GwGetChannelResponData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 协调器当前信道 |
| | | /// </summary> |
| | | public int channel = 999; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 更改协调器当前信道. |
| | | /// <summary> |
| | | /// 更改协调器当前信道,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ChangeChannelResponAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 更改协调器当前信道数据 |
| | | /// </summary> |
| | | public ChangeChannelResponData changeChannelResponData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更改协调器当前信道数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ChangeChannelResponData |
| | | { |
| | | /// <summary> |
| | | /// 是否配置成功 |
| | | ///<para>0:成功</para> |
| | | ///<para>1:失败</para> |
| | | ///<para>2:配置的信道为无效值</para> |
| | | /// </summary> |
| | | public int Status = 999; |
| | | /// <summary> |
| | | /// 协调器当前信道 |
| | | /// </summary> |
| | | public int Channel = 999; |
| | | } |
| | | #endregion |
| | | |
| | | #region 读取协调器MAC地址 |
| | | /// <summary> |
| | | /// 读取协调器MAC地址,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetMacResponData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 协调器mac地址 |
| | | /// </summary> |
| | | public MacAddrData macAddrData; |
| | | } |
| | | /// <summary> |
| | | /// 读取协调器MAC地址,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class MacAddrData |
| | | { |
| | | /// <summary> |
| | | /// 协调器mac地址 |
| | | /// </summary> |
| | | public string MacAddr; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 启用或关闭透传数据上传接口 |
| | | /// <summary> |
| | | /// 透传数据上传接口,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class PassthroughAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 已经转换成字符格式的16进制的透传数据 |
| | | /// </summary> |
| | | public string passData; |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户端发送文件流到网关 |
| | | /// <summary> |
| | | /// 客户端发送文件流到网关 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SendFileResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 0: 数据写入成功,请求发送下一个数据包 |
| | | ///<para>1:数据写入失败</para> |
| | | ///<para>2:数据解析错误</para> |
| | | ///<para>3:发送数据大小超出限制</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 客户端发送创建文件命令 |
| | | /// <summary> |
| | | /// 客户端发送创建文件命令,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class CreateFileResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 0:创建成功 |
| | | ///<para>1:失败,无法创建文件</para> |
| | | ///<para>2:失败,该客户端有文件还没上传完成,请等待文件上传完毕(一个客户端只能同时上传一个文件)</para> |
| | | /// </summary> |
| | | public int Result = 999;
|
| | | } |
| | | #endregion |
| | | |
| | | #region 查看网关目录文件信息 |
| | | /// <summary> |
| | | /// 查看网关目录文件信息,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FileTransferLsDiResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 查看网关目录文件信息 |
| | | /// </summary> |
| | | public FileTransferLsDiResponseData fileTransferLsDiResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 客户端发送创建文件命令,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FileTransferLsDiResponseData |
| | | { |
| | | /// <summary> |
| | | ///0: 成功 |
| | | ///<para>1:查看失败</para> |
| | | /// </summary> |
| | | public int Result; |
| | | /// <summary> |
| | | /// 目录文件列表 |
| | | /// </summary> |
| | | public List<DriObj> Dir = new List<DriObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 目录文件 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DriObj |
| | | { |
| | | /// <summary> |
| | | ///文件(包含所在路径和文件名称:如/usr/sbin/aa.txt) |
| | | /// </summary> |
| | | public string File; |
| | | |
| | | /// <summary> |
| | | ///文件大小(byte) |
| | | /// </summary> |
| | | public int FileSize; |
| | | |
| | | /// <summary> |
| | | ///文件最后修改的utc时间戳 |
| | | /// </summary> |
| | | public int LastModifyTime; |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户端设定要下载的文件名称和路径 |
| | | /// <summary> |
| | | /// 客户端设定要下载的文件名称和路径,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SetDownloadFileResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 客户端设定要下载的文件名称和路径 |
| | | /// </summary> |
| | | public SetDownloadFileResponseData setDownloadFileResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 客户端设定要下载的文件名称和路径,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SetDownloadFileResponseData |
| | | { |
| | | /// <summary> |
| | | ///0:默认 |
| | | ///<para>1:失败,文件不存在。</para> |
| | | ///<para>2:BlockStartAddress设置不合理,超出文件大小范围。</para> |
| | | ///<para>3:当前有文件在下载,需要等待正在进行的下载任务结束。</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | /// <summary> |
| | | /// 网关文件名称 |
| | | /// </summary> |
| | | //public string BackupFileName ; |
| | | /// <summary> |
| | | /// 网关中对应文件中的数据内容 |
| | | /// </summary> |
| | | //public byte[] BackupFileContent; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 查看单个文件信息 |
| | | /// <summary> |
| | | /// 查看单个文件信息数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FileTransferGetFileInfoResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 查看单个文件信息返回的数据 |
| | | /// </summary> |
| | | public FileTransferGetFileInfoResponseData fileTransferGetFileInfoResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查看单个文件信息返回的数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FileTransferGetFileInfoResponseData |
| | | { |
| | | /// <summary> |
| | | /// 0: 成功 |
| | | ///<para>1:查看失败,文件不存在</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | /// <summary> |
| | | ///文件(包含所在路径和文件名称:如/etc/hdlDat/aa.txt) |
| | | /// </summary> |
| | | public string File; |
| | | /// <summary> |
| | | /// 文件大小(byte)(当Result = 0 时存在) |
| | | /// </summary> |
| | | public int FileSize; |
| | | /// <summary> |
| | | /// 文件最后修改的utc时间戳(当Result = 0 时存在) |
| | | /// </summary> |
| | | public int LastModifyTime; |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户端接收到网关发色数据格式后应反馈给网关到格式数据 |
| | | /// <summary> |
| | | /// 客户端接收到网关发色数据格式后应反馈给网关到格式数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DownloadFileResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 0: 数据写入成功,请求发送下一个数据包 |
| | | ///<para>1:终止下载。当下载出现错误,或者下载已经完成可以发送该值。</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 客户端接收到网关发色数据格式后应反馈给网关 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FileTransferDownloadFileRespon |
| | | { |
| | | /// <summary> |
| | | /// 0: 数据写入成功,请求发送下一个数据包 |
| | | ///<para>1:终止下载。当下载出现错误,或者下载已经完成可以发送该值。</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | } |
| | | #endregion |
| | | |
| | | #region 删除文件或目录 |
| | | /// <summary> |
| | | /// 删除文件或目录,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelFileOrDirResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 删除文件或目录 |
| | | /// </summary> |
| | | public DelFileOrDirResponseData delFileOrDirResponseData; |
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 删除文件或目录,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelFileOrDirResponseData |
| | | { |
| | | /// <summary> |
| | | ///0: 删除成功 |
| | | ///<para>1:删除失败,路径不存在</para> |
| | | ///<para>2:无法删除。</para> |
| | | /// </summary> |
| | | public int Result; |
| | | |
| | | /// <summary> |
| | | ///目录或文件的路径 |
| | | /// </summary> |
| | | public string Path;
|
| | | } |
| | | #endregion |
| | | |
| | | #region 创建一个目录 |
| | | /// <summary> |
| | | /// 创建一个目录,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class CreateDirResponseAllData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 创建一个目录 |
| | | /// </summary> |
| | | public CreateDirResponseData createDirResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建一个目录,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class CreateDirResponseData |
| | | { |
| | | /// <summary> |
| | | ///0: 创建成功 |
| | | ///<para>1:创建失败</para> |
| | | /// </summary> |
| | | public int Result; |
| | | |
| | | /// <summary> |
| | | ///目录或文件的路径 |
| | | /// </summary> |
| | | public string Path; |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户端发送DES密钥到网关 |
| | | /// <summary> |
| | | /// 客户端发送DES密钥到网关,网关反馈具体信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class SendKeyResponData : CommonDevice.ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 0:成功 |
| | | ///<para>1:失败,RSA私钥解密失败</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |