Esempio n. 1
0
    public void ShowEachByteOfPacket(bool IsSend, AmPackUnit pPack)
    {
        int ii, num;
        if (IsSend)
            num = pPack.mBuffer.Length;
        else
            num = wLen + 14;

        for (ii=0; ii<num; ii++) {
            //Debug.Log("Cur byte is:>>" + (byte)mSendBuff[ii] + " // " +  (char)mSendBuff[ii] + " << at " + ii + "\n"  );
            byte cur;
            if (IsSend)
                cur = pPack.mBuffer [ii];
            else
                cur = pPack.mBuffer [ii];
            string hexOutput = String.Format ("{0:X}", cur);
            //System.Text.Encoding.ASCIIEncoding.GetBytes(x.ToString());

            if (ii == 14)
                Ag.LogString("______________________________ Above are Header ______________________________");

            Debug.Log ("Cur byte is:>>0x " + hexOutput +  ", \t   at \t ____ " + ii + " \t ____  \t DEC : " + cur + " \t _____      \t" +  ((char)cur).ToString() );
        }
        Debug.Log ("______________________________ Total Length = " + num + "\n");
    }
Esempio n. 2
0
 public void ShowHeader(bool pIsSendCase, AmPackUnit thePack)
 {
 }