Exemple #1
0
    /// <summary>
    /// 发送钢瓶罐装信息
    /// </summary>
    public void SendGPGZSubmit(GPGZSubmit gpgz)
    {
        try
        {
            byte[] bts = gpgz.GetBytes();
            byte[] btsSend = new byte[bts.Length + 4];
            Array.Copy(BitConverter.GetBytes(TcpCmdID.GAS_UP_GPGZ_SEND), 0, btsSend, 0, 4);
            Array.Copy(bts, 0, btsSend, 4, bts.Length);

            HSend(btsSend);
            Debug.Log("发送成功,钢瓶灌装--" + gpgz.GPCode);
        }
        catch (Exception ex)
        {
            DisConnect();
            Debug.Log("发送失败,钢瓶灌装");// + gpgz.GPCode);
        }
    }