Esempio n. 1
0
        /// <summary>
        /// 终端注册
        /// </summary>
        /// <param name="client"></param>
        /// <param name="bodies"></param>
        /// <param name="minBufferSize"></param>
        public static void Send(this JT808TcpClient client, JT808_0x0100 bodies, int minBufferSize = 100)
        {
            JT808Header header = new JT808Header();

            header.MsgId = JT808MsgId.终端注册.ToUInt16Value();
            client.Send(header, bodies, minBufferSize);
        }
Esempio n. 2
0
        public static void Send(this JT808TcpClient client, JT808Package package, int minBufferSize = 4096)
        {
            package.Header.TerminalPhoneNo = client.DeviceConfig.TerminalPhoneNo;
            JT808ClientRequest request = new JT808ClientRequest(package, minBufferSize);

            client.Send(request);
        }
Esempio n. 3
0
        public static void Send(this JT808TcpClient client, JT808Header header, JT808Bodies bodies, int minBufferSize = 1024)
        {
            JT808Package package = new JT808Package();

            package.Header = header;
            package.Bodies = bodies;
            package.Header.TerminalPhoneNo = client.DeviceConfig.TerminalPhoneNo;
            package.Header.MsgNum          = client.DeviceConfig.MsgSNDistributed.Increment();
            JT808ClientRequest request = new JT808ClientRequest(package, minBufferSize);

            client.Send(request);
        }