| /developtools/profiler/device/services/profiler_service/test/unittest/ |
| D | profiler_service_test.cpp | 116 grpc::Status StartSession(uint32_t sessionId) in StartSession() argument 121 request.set_session_id(sessionId); in StartSession() 126 grpc::Status StopSession(uint32_t sessionId) in StopSession() argument 131 request.set_session_id(sessionId); in StopSession() 136 grpc::Status DestroySession(uint32_t sessionId) in DestroySession() argument 141 request.set_session_id(sessionId); in DestroySession() 518 uint32_t sessionId = CreateOfflineSession(); variable 519 EXPECT_NE(sessionId, 0); 521 EXPECT_EQ(DestroySession(sessionId).error_code(), grpc::StatusCode::OK); 533 uint32_t sessionId = CreateOnlineSession(); variable [all …]
|
| /developtools/hdc/test/unittest/common/ |
| D | uart_test.cpp | 36 bool MakeRndData(std::vector<uint8_t> &data, uint32_t sessionId); 37 bool MakeDemoData(std::vector<uint8_t> &data, uint32_t sessionId); 119 server->sessionId = serverId; in SetUp() 125 daemon->sessionId = daemonSessionId; in SetUp() 133 bool HdcUARTBaseTest::MakeRndData(std::vector<uint8_t> &data, uint32_t sessionId) in MakeRndData() argument 137 head.sessionId = sessionId; in MakeRndData() 149 bool HdcUARTBaseTest::MakeDemoData(std::vector<uint8_t> &data, uint32_t sessionId) in MakeDemoData() argument 153 head.sessionId = sessionId; in MakeDemoData() 201 EXPECT_CALL(mockUARTBase, ResetOldSession).WillRepeatedly([&](uint32_t sessionId) { in __anon1f4edf980202() argument 202 mockUARTBase.HdcUARTBase::ResetOldSession(sessionId); in __anon1f4edf980202() [all …]
|
| /developtools/profiler/host/smartperf/ide/src/hdc/hdcclient/ |
| D | HdcClient.ts | 34 sessionId: number = 0; property in HdcClient 54 this.sessionId = Utils.getSessionId(); 55 log('sessionId is ' + this.sessionId); 60 this.sessionId, 68 handShake.sessionId, 77 if (this.sessionId == handShake!.sessionId) { 98 …n is not eq handShake?.sessionId is : ' + handShake?.sessionId + ' now session is ' + this.session…
|
| /developtools/smartperf_host/ide/src/hdc/hdcclient/ |
| D | HdcClient.ts | 34 sessionId: number = 0; property in HdcClient 54 this.sessionId = Utils.getSessionId(); 55 log('sessionId is ' + this.sessionId); 60 this.sessionId, 68 handShake.sessionId, 77 if (this.sessionId == handShake!.sessionId) { 98 …n is not eq handShake?.sessionId is : ' + handShake?.sessionId + ' now session is ' + this.session…
|
| /developtools/hdc/src/common/ |
| D | usb.cpp | 35 hSessionBase->FreeSession(hSession->sessionId); in ReadUSB() 60 vector<uint8_t> HdcUSBBase::BuildPacketHeader(uint32_t sessionId, uint8_t option, uint32_t dataSize) in BuildPacketHeader() argument 64 head.sessionId = htonl(sessionId); in BuildPacketHeader() 82 auto header = BuildPacketHeader(hSession->sessionId, USB_OPTION_HEADER, length); in SendUSBBlock() 95 auto dummy = BuildPacketHeader(hSession->sessionId, 0, 0); in SendUSBBlock() 153 header->sessionId = ntohl(header->sessionId); in CheckPacketOption() 155 if (header->sessionId != hSession->sessionId) { in CheckPacketOption() 162 header->sessionId, hSession->sessionId); in CheckPacketOption() 163 PreSendUsbSoftReset(hSession, header->sessionId); in CheckPacketOption()
|
| D | uart.cpp | 455 uint32_t sessionId = 0; in PackageProcess() local 458 if (ValidateUartPacket(data, sessionId, packageIndex, packetSize) != RET_SUCCESS) { in PackageProcess() 473 hSession = GetSession(sessionId); in PackageProcess() 476 hSession = GetSession(sessionId, true); in PackageProcess() 480 … WRITE_LOG(LOG_WARN, "%s have not found session (%u). skip it", __FUNCTION__, sessionId); in PackageProcess() 500 ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex, in PackageProcess() 540 hSession = GetSession(uartHeader->sessionId); in SendUARTRaw() 543 WRITE_LOG(LOG_WARN, "%s hSession not found:%zu", __FUNCTION__, uartHeader->sessionId); in SendUARTRaw() 583 if (head->sessionId != hSession->sessionId) { in UartSendToHdcStream() 586 head->sessionId); in UartSendToHdcStream() [all …]
|
| D | session.cpp | 116 … hTask->closeRetryCount, GLOBAL_TIMEOUT, hTask->taskType, hTask->channelId, hTask->sessionId); in BeginRemoveTask() 175 FreeSession(hSession->sessionId); in ClearSessions() 315 void HdcSessionBase::PushAsyncMessage(const uint32_t sessionId, const uint8_t method, const void *d… in PushAsyncMessage() argument 322 param->sid = sessionId; in PushAsyncMessage() 403 uint32_t sessionId) in MallocSession() argument 416 hSession->sessionId = ((sessionId == 0) ? GetSessionPseudoUid() : sessionId); in MallocSession() 437 hSession->sessionId, hSession->connType); in MallocSession() 469 AdminSession(OP_ADD, hSession->sessionId, hSession); in MallocSession() 539 thisClass->AdminSession(OP_REMOVE, hSession->sessionId, nullptr); in FreeSessionFinally() 540 WRITE_LOG(LOG_DEBUG, "!!!FreeSessionFinally sessionId:%u finish", hSession->sessionId); in FreeSessionFinally() [all …]
|
| D | uart.h | 51 uint32_t sessionId; // the package owner (COM dev owner) member 62 oss << "Id:" << sessionId; 72 oss << " sessionId:" << sessionId; in ToDebugString() 87 sessionId(sessionIdIn), 182 virtual void SendUartSoftReset(HSession hUART, uint32_t sessionId) {}; in SendUartSoftReset() argument 183 virtual RetErrCode ValidateUartPacket(vector<uint8_t> &data, uint32_t &sessionId, 186 virtual void ResetOldSession(uint32_t sessionId) in ResetOldSession() argument 204 virtual void ResponseUartTrans(uint32_t sessionId, uint32_t packageIndex, 211 virtual HSession GetSession(const uint32_t sessionId, bool create = false) = 0; 235 virtual void ClearUARTOutMap(uint32_t sessionId); [all …]
|
| D | session.h | 30 uint32_t sessionId; member 39 oss << " sessionId:" << sessionId; in ToDebugString() 80 …void LogMsg(const uint32_t sessionId, const uint32_t channelId, MessageLevel level, const char *ms… 88 …ocSession(bool serverOrDaemon, const ConnType connType, void *classModule, uint32_t sessionId = 0); 89 virtual void FreeSession(const uint32_t sessionId); 92 …int Send(const uint32_t sessionId, const uint32_t channelId, const uint16_t commandFlag, const uin… 95 virtual HSession AdminSession(const uint8_t op, const uint32_t sessionId, HSession hInput); 97 …virtual void PushAsyncMessage(const uint32_t sessionId, const uint8_t method, const void *data, co… 112 …virtual bool ServerCommand(const uint32_t sessionId, const uint32_t channelId, const uint16_t comm… in ServerCommand() argument
|
| D | task.cpp | 67 … return sessionBase->Send(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size) > 0; in SendToAnother() 95 sessionBase->LogMsg(taskInfo->sessionId, taskInfo->channelId, level, log.c_str()); in LogMsg() 102 return hSession->ServerCommand(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size); in ServerCommand() 109 HSession hSession = sessionBase->AdminSession(OP_QUERY, taskInfo->sessionId, nullptr); in ThreadCtrlCommunicate()
|
| /developtools/profiler/host/smartperf/ide/src/hdc/message/ |
| D | USBHead.ts | 24 constructor(flag: number[], option: number, sessionId: number, dataSize: number) { 28 this._sessionId = sessionId; 69 let sessionId = data.getUint32(3); 71 return new USBHead([flagZero, flagOne], option, sessionId, dataSize); 90 get sessionId(): number { method in USBHead 94 set sessionId(value: number) { method in USBHead
|
| D | SessionHandShake.ts | 28 …constructor(banner: string, authType: number, sessionId: number, connectKey: string, buf: string) { 32 this._sessionId = sessionId; 58 get sessionId(): number { method in SessionHandShake 62 set sessionId(value: number) { method in SessionHandShake
|
| /developtools/smartperf_host/ide/src/hdc/message/ |
| D | USBHead.ts | 24 constructor(flag: number[], option: number, sessionId: number, dataSize: number) { 28 this._sessionId = sessionId; 69 let sessionId = data.getUint32(3); 71 return new USBHead([flagZero, flagOne], option, sessionId, dataSize); 90 get sessionId(): number { method in USBHead 94 set sessionId(value: number) { method in USBHead
|
| D | SessionHandShake.ts | 28 …constructor(banner: string, authType: number, sessionId: number, connectKey: string, buf: string) { 32 this._sessionId = sessionId; 58 get sessionId(): number { method in SessionHandShake 62 set sessionId(value: number) { method in SessionHandShake
|
| /developtools/hdc/src/daemon/ |
| D | daemon_uart.cpp | 162 void HdcDaemonUART::ResetOldSession(uint32_t sessionId) in ResetOldSession() argument 164 if (sessionId == 0) { in ResetOldSession() 165 sessionId = currentSessionId; in ResetOldSession() 167 HSession hSession = daemon.AdminSession(OP_QUERY, sessionId, nullptr); in ResetOldSession() 175 WRITE_LOG(LOG_WARN, "Hostside softreset to restart daemon, old sessionId:%u", sessionId); in ResetOldSession() 179 HSession HdcDaemonUART::GetSession(const uint32_t sessionId, bool create = false) in GetSession() argument 181 HSession hSession = daemon.AdminSession(OP_QUERY, sessionId, nullptr); in GetSession() 183 hSession = PrepareNewSession(sessionId); in GetSession() 193 daemon.FreeSession(session->sessionId); in OnTransferError() 194 ClearUARTOutMap(session->sessionId); in OnTransferError() [all …]
|
| D | daemon_usb.cpp | 214 void HdcDaemonUSB::ResetOldSession(uint32_t sessionId) in ResetOldSession() argument 217 if (sessionId == 0) { in ResetOldSession() 218 sessionId = currentSessionId; in ResetOldSession() 220 HSession hSession = daemon->AdminSession(OP_QUERY, sessionId, nullptr); in ResetOldSession() 225 WRITE_LOG(LOG_WARN, "Hostside softreset to restart daemon, old sessionId:%u", sessionId); in ResetOldSession() 226 daemon->FreeSession(sessionId); in ResetOldSession() 230 int HdcDaemonUSB::AvailablePacket(uint8_t *ioBuf, int ioBytes, uint32_t *sessionId) in AvailablePacket() argument 239 uint32_t inSessionId = ntohl(usbPayloadHeader->sessionId); in AvailablePacket() 245 *sessionId = inSessionId; in AvailablePacket() 334 daemon->FreeSession(hSession->sessionId); in SendUSBRaw() [all …]
|
| D | daemon.cpp | 210 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in HandDaemonAuth() 230 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in HandDaemonAuth() 267 uint32_t unOld = hSession->sessionId; in DaemonSessionHandshake() 268 hSession->sessionId = handshake.sessionId; in DaemonSessionHandshake() 276 (static_cast<HdcDaemonUART *>(clsUARTServ))->OnNewHandshakeOK(hSession->sessionId); in DaemonSessionHandshake() 281 (reinterpret_cast<HdcDaemonUSB *>(clsUSBServ))->OnNewHandshakeOK(hSession->sessionId); in DaemonSessionHandshake() 284 handshake.sessionId = 0; in DaemonSessionHandshake() 301 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, (uint8_t *)failedString.c_str(), in DaemonSessionHandshake() 312 … WRITE_LOG(LOG_INFO, "session %u handshakeOK send back CMD_KERNEL_HANDSHAKE", hSession->sessionId); in DaemonSessionHandshake() 320 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in DaemonSessionHandshake() [all …]
|
| D | daemon_usb.h | 27 void OnNewHandshakeOK(const uint32_t sessionId); 44 int DispatchToWorkThread(uint32_t sessionId, uint8_t *readBuf, int readBytes); 45 int AvailablePacket(uint8_t *ioBuf, int ioBytes, uint32_t *sessionId); 50 HSession PrepareNewSession(uint32_t sessionId, uint8_t *pRecvBuf, int recvBytesIO); 54 void ResetOldSession(uint32_t sessionId);
|
| D | daemon_uart.h | 29 void OnNewHandshakeOK(const uint32_t sessionId); 32 virtual HSession GetSession(const uint32_t sessionId, bool create) override; 54 virtual HSession PrepareNewSession(uint32_t sessionId); 58 virtual void ResetOldSession(uint32_t sessionId) override;
|
| /developtools/profiler/device/services/profiler_service/src/ |
| D | profiler_service.cpp | 329 uint32_t sessionId = ++sessionIdCounter_; in CreateSession() local 330 ctx->id = sessionId; in CreateSession() 331 ctx->name = "session-" + std::to_string(sessionId); in CreateSession() 334 CHECK_EXPRESSION_TRUE(AddSessionContext(sessionId, ctx), "sessionId conflict!"); in CreateSession() 347 response->set_session_id(sessionId); in CreateSession() 349 HILOG_INFO(LOG_CORE, "CreateSession %d %u done!", request->request_id(), sessionId); in CreateSession() 353 bool ProfilerService::AddSessionContext(uint32_t sessionId, const SessionContextPtr& sessionCtx) in AddSessionContext() argument 356 CHECK_TRUE(sessionContext_.count(sessionId) == 0, false, "sessionId already exists!"); in AddSessionContext() 357 sessionContext_[sessionId] = sessionCtx; in AddSessionContext() 361 ProfilerService::SessionContextPtr ProfilerService::GetSessionContext(uint32_t sessionId) const in GetSessionContext() [all …]
|
| /developtools/smartperf_host/ide/test/hdc/message/ |
| D | USBHead.test.ts | 44 expect(usbHead.sessionId).toBeUndefined(); 48 usbHead.sessionId = true; 49 expect(usbHead.sessionId).toBeTruthy();
|
| D | SessionHandShake.test.ts | 44 expect(sessionHandShake.sessionId).toBeUndefined(); 48 sessionHandShake.sessionId = true; 49 expect(sessionHandShake.sessionId).toBeTruthy();
|
| /developtools/profiler/host/smartperf/client/client_command/ |
| D | sp_task.cpp | 36 std::string sessionId; in ParseToTask() local 42 sessionId = args[++i]; in ParseToTask() 53 if (sessionId.empty()) { in ParseToTask() 60 taskInfo = { sessionId, pkg, configs, interval }; in ParseToTask() 104 std::cout << "Task " << curTaskInfo.sessionId << ": collecting data loop..." << std::endl; in StartTask() 137 std::string thisBasePath = baseOutPath + "/" + curTaskInfo.sessionId; in StopTask() 147 {"sessionId", curTaskInfo.sessionId}, in StopTask() 148 {"taskId", curTaskInfo.sessionId}, in StopTask()
|
| /developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/entity/ |
| D | LocalConfigEntity.ts | 93 public sessionId: String; property in ReportItem 103 …constructor(sessionId: String, dbPath: String, packageName: String, iconId: String, name: String, … 104 this.sessionId = sessionId
|
| /developtools/profiler/host/smartperf/ide/src/hdc/transmission/ |
| D | DataProcessing.ts | 82 sessionId: number, 110 … let header = this.buildPacketHeader(sessionId, UsbProtocolOption.USB_OPTION_HEADER, finalBufSize); 120 private buildPacketHeader(sessionId: number, option: number, dataSize: number): Uint8Array { 124 sessionId,
|