Home
last modified time | relevance | path

Searched refs:sessionId (Results 1 – 25 of 53) sorted by relevance

123

/developtools/profiler/device/services/profiler_service/test/unittest/
Dprofiler_service_test.cpp115 grpc::Status StartSession(uint32_t sessionId) in StartSession() argument
120 request.set_session_id(sessionId); in StartSession()
125 grpc::Status StopSession(uint32_t sessionId) in StopSession() argument
130 request.set_session_id(sessionId); in StopSession()
135 grpc::Status DestroySession(uint32_t sessionId) in DestroySession() argument
140 request.set_session_id(sessionId); in DestroySession()
517 uint32_t sessionId = CreateOfflineSession(); variable
518 EXPECT_NE(sessionId, 0);
520 EXPECT_EQ(DestroySession(sessionId).error_code(), grpc::StatusCode::OK);
532 uint32_t sessionId = CreateOnlineSession(); variable
[all …]
/developtools/hdc/test/unittest/common/
Duart_test.cpp36 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 __anon0ea3bfba0202() argument
202 mockUARTBase.HdcUARTBase::ResetOldSession(sessionId); in __anon0ea3bfba0202()
[all …]
Dhost_uart_test.cpp512 constexpr uint32_t sessionId = 1234; variable
515 resetPackage.sessionId = sessionId;
520 mockHostUART.SendUartSoftReset(&mySession, sessionId);
540 EXPECT_CALL(mockServer, FreeSession(mySession.sessionId)).Times(1);
739 constexpr uint32_t sessionId = 1234; variable
743 EXPECT_CALL(mockServer, AdminSession(OP_QUERY, sessionId, nullptr))
746 mockHostUART.GetSession(sessionId, false);
789 const uint32_t sessionId = 12345; variable
790 mySession.sessionId = sessionId;
792 EXPECT_CALL(mockServer, EchoToClientsForSession(sessionId, _)).WillOnce(Return());
[all …]
/developtools/profiler/host/smartperf/ide/src/hdc/hdcclient/
DHdcClient.ts33 sessionId: number = 0; property in HdcClient
49 this.sessionId = Utils.getSessionId();
50 log("sessionId is " + this.sessionId)
52 …hake = new SessionHandShake(HANDSHAKE_MESSAGE, AuthType.AUTH_NONE, this.sessionId, this.usbDevice.…
55 …let sendResult = await this.readDataProcessing.send(handShake.sessionId, 0, HdcCommand.CMD_KERNEL_…
59 if (this.sessionId == handShake!.sessionId) {
74 …n is not eq handShake?.sessionId is : " + handShake?.sessionId + " now session is " + this.session…
/developtools/profiler/host/smartperf/ide/src/hdc/message/
DUSBHead.ts24 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);
91 get sessionId(): number { method in USBHead
95 set sessionId(value: number) { method in USBHead
DSessionHandShake.ts28 …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/
Ddaemon_uart.cpp162 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 …]
Ddaemon_usb.cpp218 void HdcDaemonUSB::ResetOldSession(uint32_t sessionId) in ResetOldSession() argument
221 if (sessionId == 0) { in ResetOldSession()
222 sessionId = currentSessionId; in ResetOldSession()
224 HSession hSession = daemon->AdminSession(OP_QUERY, sessionId, nullptr); in ResetOldSession()
229 WRITE_LOG(LOG_WARN, "Hostside softreset to restart daemon, old sessionId:%u", sessionId); in ResetOldSession()
230 daemon->FreeSession(sessionId); in ResetOldSession()
234 int HdcDaemonUSB::AvailablePacket(uint8_t *ioBuf, int ioBytes, uint32_t *sessionId) in AvailablePacket() argument
243 uint32_t inSessionId = ntohl(usbPayloadHeader->sessionId); in AvailablePacket()
249 *sessionId = inSessionId; in AvailablePacket()
335 daemon->FreeSession(hSession->sessionId); in SendUSBRaw()
[all …]
Ddaemon_usb.h27 void OnNewHandshakeOK(const uint32_t sessionId);
43 int DispatchToWorkThread(uint32_t sessionId, uint8_t *readBuf, int readBytes);
44 int AvailablePacket(uint8_t *ioBuf, int ioBytes, uint32_t *sessionId);
49 HSession PrepareNewSession(uint32_t sessionId, uint8_t *pRecvBuf, int recvBytesIO);
53 void ResetOldSession(uint32_t sessionId);
Ddaemon.cpp209 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in HandDaemonAuth()
229 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in HandDaemonAuth()
265 uint32_t unOld = hSession->sessionId; in DaemonSessionHandshake()
266 hSession->sessionId = handshake.sessionId; in DaemonSessionHandshake()
274 (static_cast<HdcDaemonUART *>(clsUARTServ))->OnNewHandshakeOK(hSession->sessionId); in DaemonSessionHandshake()
279 (reinterpret_cast<HdcDaemonUSB *>(clsUSBServ))->OnNewHandshakeOK(hSession->sessionId); in DaemonSessionHandshake()
282 handshake.sessionId = 0; in DaemonSessionHandshake()
299 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, (uint8_t *)failedString.c_str(), in DaemonSessionHandshake()
310 … WRITE_LOG(LOG_INFO, "session %u handshakeOK send back CMD_KERNEL_HANDSHAKE", hSession->sessionId); in DaemonSessionHandshake()
318 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in DaemonSessionHandshake()
[all …]
Ddaemon_uart.h29 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/hdc/src/common/
Dusb.cpp34 hSessionBase->FreeSession(hSession->sessionId); in ReadUSB()
58 vector<uint8_t> HdcUSBBase::BuildPacketHeader(uint32_t sessionId, uint8_t option, uint32_t dataSize) in BuildPacketHeader() argument
62 head.sessionId = htonl(sessionId); in BuildPacketHeader()
78 auto header = BuildPacketHeader(hSession->sessionId, USB_OPTION_HEADER, length); in SendUSBBlock()
92 auto dummy = BuildPacketHeader(hSession->sessionId, 0, 0); in SendUSBBlock()
149 header->sessionId = ntohl(header->sessionId); in CheckPacketOption()
151 if (header->sessionId != hSession->sessionId) { in CheckPacketOption()
157 PreSendUsbSoftReset(hSession, header->sessionId); in CheckPacketOption()
Duart.cpp450 uint32_t sessionId = 0; in PackageProcess() local
453 if (ValidateUartPacket(data, sessionId, packageIndex, packetSize) != RET_SUCCESS) { in PackageProcess()
468 hSession = GetSession(sessionId); in PackageProcess()
471 hSession = GetSession(sessionId, true); in PackageProcess()
475 … WRITE_LOG(LOG_WARN, "%s have not found session (%u). skip it", __FUNCTION__, sessionId); in PackageProcess()
495 ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex, in PackageProcess()
535 hSession = GetSession(uartHeader->sessionId); in SendUARTRaw()
538 WRITE_LOG(LOG_WARN, "%s hSession not found:%zu", __FUNCTION__, uartHeader->sessionId); in SendUARTRaw()
578 if (head->sessionId != hSession->sessionId) { in UartSendToHdcStream()
581 head->sessionId); in UartSendToHdcStream()
[all …]
Duart.h51 uint32_t sessionId; // the package owner (COM dev owner) member
62 oss << "Id:" << sessionId;
72 oss << " sessionId:" << sessionId; in ToDebugString()
87 sessionId(sessionIdIn),
181 virtual void SendUartSoftReset(HSession hUART, uint32_t sessionId) {}; in SendUartSoftReset() argument
182 virtual RetErrCode ValidateUartPacket(vector<uint8_t> &data, uint32_t &sessionId,
185 virtual void ResetOldSession(uint32_t sessionId) in ResetOldSession() argument
203 virtual void ResponseUartTrans(uint32_t sessionId, uint32_t packageIndex,
210 virtual HSession GetSession(const uint32_t sessionId, bool create = false) = 0;
234 virtual void ClearUARTOutMap(uint32_t sessionId);
[all …]
Dsession.cpp113 … hTask->closeRetryCount, GLOBAL_TIMEOUT, hTask->taskType, hTask->channelId, hTask->sessionId); in BeginRemoveTask()
171 FreeSession(hSession->sessionId); in ClearSessions()
310 void HdcSessionBase::PushAsyncMessage(const uint32_t sessionId, const uint8_t method, const void *d… in PushAsyncMessage() argument
317 param->sid = sessionId; in PushAsyncMessage()
398 uint32_t sessionId) in MallocSession() argument
412 hSession->sessionId = ((sessionId == 0) ? GetSessionPseudoUid() : sessionId); in MallocSession()
433 hSession->sessionId, hSession->connType); in MallocSession()
458 AdminSession(OP_ADD, hSession->sessionId, hSession); in MallocSession()
528 thisClass->AdminSession(OP_REMOVE, hSession->sessionId, nullptr); in FreeSessionFinally()
529 WRITE_LOG(LOG_DEBUG, "!!!FreeSessionFinally sessionId:%u finish", hSession->sessionId); in FreeSessionFinally()
[all …]
Dsession.h30 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
Dtask.cpp64 … return sessionBase->Send(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size) > 0; in SendToAnother()
92 sessionBase->LogMsg(taskInfo->sessionId, taskInfo->channelId, level, log.c_str()); in LogMsg()
99 return hSession->ServerCommand(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size); in ServerCommand()
106 HSession hSession = sessionBase->AdminSession(OP_QUERY, taskInfo->sessionId, nullptr); in ThreadCtrlCommunicate()
/developtools/profiler/device/services/profiler_service/src/
Dprofiler_service.cpp333 uint32_t sessionId = ++sessionIdCounter_; in CreateSession() local
334 ctx->id = sessionId; in CreateSession()
335 ctx->name = "session-" + std::to_string(sessionId); in CreateSession()
338 CHECK_EXPRESSION_TRUE(AddSessionContext(sessionId, ctx), "sessionId conflict!"); in CreateSession()
351 response->set_session_id(sessionId); in CreateSession()
354 HILOG_INFO(LOG_CORE, "CreateSession %d %u done!", request->request_id(), sessionId); in CreateSession()
358 bool ProfilerService::AddSessionContext(uint32_t sessionId, const SessionContextPtr& sessionCtx) in AddSessionContext() argument
361 if (sessionContext_.count(sessionId) > 0) { in AddSessionContext()
365 sessionContext_[sessionId] = sessionCtx; in AddSessionContext()
369 ProfilerService::SessionContextPtr ProfilerService::GetSessionContext(uint32_t sessionId) const in GetSessionContext()
[all …]
/developtools/profiler/host/smartperf/ide/test/hdc/message/
DUSBHead.test.ts44 expect(usbHead.sessionId).toBeUndefined()
48 usbHead.sessionId = true;
49 expect(usbHead.sessionId).toBeTruthy()
DSessionHandShake.test.ts44 expect(sessionHandShake.sessionId).toBeUndefined()
48 sessionHandShake.sessionId = true
49 expect(sessionHandShake.sessionId).toBeTruthy()
/developtools/profiler/host/smartperf/client/client_command/
Dsp_task.cpp36 std::string sessionId; in ParseToTask() local
42 sessionId = args[++i]; in ParseToTask()
51 if (sessionId.empty()) { in ParseToTask()
58 taskInfo = { sessionId, pkg, configs, interval }; in ParseToTask()
98 std::cout << "Task " << curTaskInfo.sessionId << ": collecting data loop..." << std::endl; in StartTask()
122 std::string thisBasePath = baseOutPath + "/" + curTaskInfo.sessionId; in StopTask()
132 {"sessionId", curTaskInfo.sessionId}, in StopTask()
133 {"taskId", curTaskInfo.sessionId}, in StopTask()
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/entity/
DLocalConfigEntity.ts93 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/
DDataProcessing.ts81 …public async send(sessionId: number, channelId: number, commandFlag: number, data: Uint8Array, dat…
93 … let header = this.buildPacketHeader(sessionId, UsbProtocolOption.USB_OPTION_HEADER, finalBufSize);
103 private buildPacketHeader(sessionId: number, option: number, dataSize: number): Uint8Array {
104 …BHead([USB_PACKET_FLAG.charCodeAt(0), USB_PACKET_FLAG.charCodeAt(1)], option, sessionId, dataSize);
/developtools/profiler/device/cmds/src/
Dmain.cpp213 bool CheckStartSession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckStartSession() argument
218 startRequest.set_session_id(sessionId); in CheckStartSession()
229 bool CheckStopSession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckStopSession() argument
234 stopRequest.set_session_id(sessionId); in CheckStopSession()
243 bool CheckDestroySession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckDestroySession() argument
248 destroyRequest.set_session_id(sessionId); in CheckDestroySession()
265 uint32_t sessionId = CreateSession(profilerStub, configFile, keepSecond, outputFile); in DoCapture() local
266 if (sessionId == 0) { in DoCapture()
277 keepRequest.set_session_id(sessionId); in DoCapture()
286 if (!CheckStartSession(profilerStub, sessionId)) { in DoCapture()
[all …]
/developtools/hdc/src/host/
Dserver.cpp405 CleanForwardMap(hSession->sessionId); in NotifyInstanceSessionFree()
448 Send(hSession->sessionId, 0, CMD_KERNEL_HANDSHAKE, in HandServerAuth()
463 Send(hSession->sessionId, 0, CMD_KERNEL_HANDSHAKE, in HandServerAuth()
546 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, &flag, 1); in FetchCommand()
573 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, payload, 1); in FetchCommand()
582 pdiNew->sessionId = hSession->sessionId; in FetchCommand()
687 void HdcServer::CleanForwardMap(uint32_t sessionId) in CleanForwardMap() argument
696 if (sessionId == 0 || sessionId == di->sessionId) { in CleanForwardMap()
714 hdcServer->FreeSession(hSession->sessionId); in UsbPreConnect()
748 hdcServer->FreeSession(hSession->sessionId); in UartPreConnect()
[all …]

123