wei
2020-11-27 1293fea19c6a2b558986856e301d5218c1979692
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Text;
 
namespace HDL_ON.DriverLayer
{
    public class A_Protocal_Common
    {
        public static A_Protocal_Common apc;
 
        public A_Protocal_Common()
        {
            apc = new A_Protocal_Common();
        }
 
 
        /// <summary>  
        /// 获取13位时间戳
        /// </summary>  
        /// <param name="time">时间</param>  
        /// <returns>long</returns>  
        public long Get_time_stamp()
        {
            //DateTime startTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);
            long t = DateTime.Now.Ticks / 10000;   //除10000调整为13位      
            return t;
        }
 
    }
    /// <summary>
    /// 通讯回复数据包
    /// </summary>
    public class ResponsePack
    {
        public string id;
        public string code;
        public string time_stamp;
        public object objects;
    }
 
    /// <summary>
    /// 通讯主题
    /// </summary>
    public static class CommunicationTopic
    {
        /// <summary>
        /// 搜索本地网关
        /// </summary>
        public const string SearchLoaclGateway = "/user/all/custom/gateway/search";
    }
}