Lines Matching refs:sessionId
457 uint32_t sessionId = 0;
460 if (ValidateUartPacket(data, sessionId, packageIndex, packetSize) != RET_SUCCESS) {
475 hSession = GetSession(sessionId);
478 hSession = GetSession(sessionId, true);
482 WRITE_LOG(LOG_WARN, "%s have not found session (%u). skip it", __FUNCTION__, sessionId);
502 ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex,
542 hSession = GetSession(uartHeader->sessionId);
545 WRITE_LOG(LOG_WARN, "%s hSession not found:%zu", __FUNCTION__, uartHeader->sessionId);
585 if (head->sessionId != hSession->sessionId) {
587 WRITE_LOG(LOG_FATAL, "%s sessionId not matched, reset sessionId:%d.", __FUNCTION__,
588 head->sessionId);
589 SendUartSoftReset(hSession, head->sessionId);
665 slots.Wait(head->sessionId);
675 outPkgs.emplace_back(pkgId, head->sessionId, data, length, response,
697 slots.Free(it->sessionId);
731 if (!it->response and hasWaitPkg.find(it->sessionId) != hasWaitPkg.end()) {
755 hasWaitPkg.emplace(it->sessionId);
778 it->sessionId);
779 OnTransferError(GetSession(it->sessionId));
786 hasWaitPkg.emplace(it->sessionId);
793 void HdcUARTBase::ClearUARTOutMap(uint32_t sessionId)
795 WRITE_LOG(LOG_DEBUG, "%s UartPackageManager clean for sessionId %u", __FUNCTION__, sessionId);
800 if (it->sessionId == sessionId) {
802 slots.Free(it->sessionId);
825 RetErrCode HdcUARTBase::ValidateUartPacket(vector<uint8_t> &data, uint32_t &sessionId,
843 sessionId = head->sessionId;
854 WRITE_LOG(LOG_WARN, "%s host side want restart daemon, restart old sessionId:%u",
855 __FUNCTION__, head->sessionId);
856 ResetOldSession(head->sessionId);
864 head->sessionId);
865 Restartession(GetSession(head->sessionId));
880 ResponseUartTrans(head->sessionId, head->packageIndex, PKG_OPTION_ACK);
887 void HdcUARTBase::ResponseUartTrans(uint32_t sessionId, uint32_t packageIndex,
890 UartHead uartHeader(sessionId, option, 0, packageIndex);
898 WRITE_LOG(LOG_DEBUG, "SendUARTData hSession:%u, total length:%d", hSession->sessionId, length);
914 head->sessionId = hSession->sessionId;
957 WRITE_LOG(LOG_DEBUG, "%s sessionId:%u, nread:%zd %s streamSize %zu", __FUNCTION__,
958 hSession->sessionId, nread, buffer,
969 hUARTBase->ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex,
973 hSessionBase->FreeSession(hSession->sessionId);
976 WRITE_LOG(LOG_DEBUG, "%s sessionId:%u, nread:%d", __FUNCTION__, hSession->sessionId, nread);
1002 ClearUARTOutMap(session->sessionId);
1003 sessionBase.FreeSession(session->sessionId);
1011 ClearUARTOutMap(hSession->sessionId);