示例#1
0
 void freeSession(CMDSession session)
 {
     if (session.usageFlag == true)
     {
         API_LOG(serialDevice, DEBUG_LOG, "session id {0}", session.sessionID);
         freeMemory(session.mmu);
         session.usageFlag = false;
     }
 }
示例#2
0
        void setupSession()
        {
            for (var i = 0; i < SESSION_TABLE_NUM; i++)
            {
                CMDSessionTab[i] = new CMDSession();

                CMDSessionTab[i].sessionID = (byte)(i);
                CMDSessionTab[i].usageFlag = false;
                CMDSessionTab[i].mmu       = null;
            }

            for (var i = 0; i < (SESSION_TABLE_NUM - 1); i++)
            {
                ACKSessionTab[i] = new ACKSession();

                ACKSessionTab[i].sessionID     = (byte)(i + 1);
                ACKSessionTab[i].sessionStatus = ACK_SESSION_IDLE;
                ACKSessionTab[i].mmu           = null;
            }
        }