Home
last modified time | relevance | path

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

123

/developtools/profiler/device/services/profiler_service/test/unittest/
Dprofiler_service_test.cpp116 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/
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 __anon7f708f190202() argument
202 mockUARTBase.HdcUARTBase::ResetOldSession(sessionId); in __anon7f708f190202()
[all …]
Dhost_uart_test.cpp513 constexpr uint32_t sessionId = 1234; variable
516 resetPackage.sessionId = sessionId;
521 mockHostUART.SendUartSoftReset(&mySession, sessionId);
541 EXPECT_CALL(mockServer, FreeSession(mySession.sessionId)).Times(1);
740 constexpr uint32_t sessionId = 1234; variable
744 EXPECT_CALL(mockServer, AdminSession(OP_QUERY, sessionId, nullptr))
747 mockHostUART.GetSession(sessionId, false);
791 const uint32_t sessionId = 12345; variable
792 mySession.sessionId = sessionId;
794 EXPECT_CALL(mockServer, EchoToClientsForSession(sessionId, _)).WillOnce(Return());
[all …]
/developtools/hdc/src/common/
Dusb.cpp35 WRITE_LOG(LOG_FATAL, "ReadUSB FetchIOBuf error sessionId:%u", hSession->sessionId); in ReadUSB()
36 hSessionBase->FreeSession(hSession->sessionId); in ReadUSB()
65 vector<uint8_t> HdcUSBBase::BuildPacketHeader(uint32_t sessionId, uint8_t option, uint32_t dataSize) in BuildPacketHeader() argument
69 head.sessionId = htonl(sessionId); in BuildPacketHeader()
87 auto header = BuildPacketHeader(hSession->sessionId, USB_OPTION_HEADER, length); in SendUSBBlock()
100 auto dummy = BuildPacketHeader(hSession->sessionId, 0, 0); in SendUSBBlock()
158 header->sessionId = ntohl(header->sessionId); in CheckPacketOption()
160 if (header->sessionId != hSession->sessionId) { in CheckPacketOption()
167 header->sessionId, hSession->sessionId); in CheckPacketOption()
168 PreSendUsbSoftReset(hSession, header->sessionId); in CheckPacketOption()
Dsession.cpp119 … hTask->closeRetryCount, GLOBAL_TIMEOUT, hTask->taskType, hTask->channelId, hTask->sessionId); in BeginRemoveTask()
161 hSession->sessionId, channelIDInput); in ClearOwnTasks()
179 FreeSession(hSession->sessionId); in ClearSessions()
319 void HdcSessionBase::PushAsyncMessage(const uint32_t sessionId, const uint8_t method, const void *d… in PushAsyncMessage() argument
326 param->sid = sessionId; in PushAsyncMessage()
407 uint32_t sessionId) in MallocSession() argument
424 hSession->sessionId = ((sessionId == 0) ? GetSessionPseudoUid() : sessionId); in MallocSession()
445 hSession->sessionId, hSession->connType); in MallocSession()
481 AdminSession(OP_ADD, hSession->sessionId, hSession); in MallocSession()
547 hSession->uvHandleRef, hSession->sessionId); in FreeSessionFinally()
[all …]
Duart.cpp457 uint32_t sessionId = 0; in PackageProcess() local
460 if (ValidateUartPacket(data, sessionId, packageIndex, packetSize) != RET_SUCCESS) { in PackageProcess()
475 hSession = GetSession(sessionId); in PackageProcess()
478 hSession = GetSession(sessionId, true); in PackageProcess()
482 … WRITE_LOG(LOG_WARN, "%s have not found session (%u). skip it", __FUNCTION__, sessionId); in PackageProcess()
502 ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex, in PackageProcess()
542 hSession = GetSession(uartHeader->sessionId); in SendUARTRaw()
545 WRITE_LOG(LOG_WARN, "%s hSession not found:%zu", __FUNCTION__, uartHeader->sessionId); in SendUARTRaw()
585 if (head->sessionId != hSession->sessionId) { in UartSendToHdcStream()
588 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),
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 …]
Dtask.cpp68 … return sessionBase->Send(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size) > 0; in SendToAnother()
96 sessionBase->LogMsg(taskInfo->sessionId, taskInfo->channelId, level, log.c_str()); in LogMsg()
103 return hSession->ServerCommand(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size); in ServerCommand()
110 HSession hSession = sessionBase->AdminSession(OP_QUERY, taskInfo->sessionId, nullptr); in ThreadCtrlCommunicate()
112 … WRITE_LOG(LOG_FATAL, "ThreadCtrlCommunicate hSession nullptr sessionId:%u", taskInfo->sessionId); in ThreadCtrlCommunicate()
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
/developtools/smartperf_host/ide/src/hdc/hdcclient/
DHdcClient.ts35 sessionId: number = 0; property in HdcClient
52 this.sessionId = Utils.getSessionId();
53 log(`sessionId is ${this.sessionId}`);
58 this.sessionId,
66 handShake.sessionId,
75 if (this.sessionId === handShake!.sessionId) {
80 …ssion is not eq handShake?.sessionId is : ${handShake?.sessionId} now session is ${this.sessionId}…
/developtools/smartperf_host/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);
90 get sessionId(): number { method in USBHead
94 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.cpp215 void HdcDaemonUSB::ResetOldSession(uint32_t sessionId) in ResetOldSession() argument
218 if (sessionId == 0) { in ResetOldSession()
219 sessionId = currentSessionId; in ResetOldSession()
221 HSession hSession = daemon->AdminSession(OP_QUERY, sessionId, nullptr); in ResetOldSession()
223 WRITE_LOG(LOG_FATAL, "ResetOldSession hSession nullptr sessionId:%u", sessionId); in ResetOldSession()
227 WRITE_LOG(LOG_WARN, "Hostside softreset to restart daemon, old sessionId:%u", sessionId); in ResetOldSession()
228 daemon->FreeSession(sessionId); in ResetOldSession()
232 int HdcDaemonUSB::AvailablePacket(uint8_t *ioBuf, int ioBytes, uint32_t *sessionId) in AvailablePacket() argument
241 uint32_t inSessionId = ntohl(usbPayloadHeader->sessionId); in AvailablePacket()
248 *sessionId = inSessionId; in AvailablePacket()
[all …]
Ddaemon.cpp210 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 …]
Ddaemon_usb.h27 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);
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/profiler/device/services/profiler_service/src/
Dprofiler_service.cpp328 uint32_t sessionId = ++sessionIdCounter_; in CreateSession() local
329 ctx->id = sessionId; in CreateSession()
330 ctx->name = "session-" + std::to_string(sessionId); in CreateSession()
333 CHECK_EXPRESSION_TRUE(AddSessionContext(sessionId, ctx), "sessionId conflict!"); in CreateSession()
346 response->set_session_id(sessionId); in CreateSession()
348 PROFILER_LOG_INFO(LOG_CORE, "CreateSession %d %u done!", request->request_id(), sessionId); in CreateSession()
352 bool ProfilerService::AddSessionContext(uint32_t sessionId, const SessionContextPtr& sessionCtx) in AddSessionContext() argument
355 CHECK_TRUE(sessionContext_.count(sessionId) == 0, false, "sessionId already exists!"); in AddSessionContext()
356 sessionContext_[sessionId] = sessionCtx; in AddSessionContext()
360 ProfilerService::SessionContextPtr ProfilerService::GetSessionContext(uint32_t sessionId) const in GetSessionContext()
[all …]
/developtools/smartperf_host/ide/test/hdc/message/
DUSBHead.test.ts43 expect(usbHead.sessionId).toBeUndefined();
47 usbHead.sessionId = true;
48 expect(usbHead.sessionId).toBeTruthy();
DSessionHandShake.test.ts43 expect(sessionHandShake.sessionId).toBeUndefined();
47 sessionHandShake.sessionId = true;
48 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()
56 taskInfo = { sessionId, pkg, configs, interval }; in ParseToTask()
94 std::cout << "Task " << curTaskInfo.sessionId << ": collecting data loop..." << std::endl; in StartTask()
124 std::string thisBasePath = baseOutPath + "/" + curTaskInfo.sessionId; in StopTask()
137 {"sessionId", curTaskInfo.sessionId}, in StopTask()
138 {"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/smartperf_host/ide/src/hdc/transmission/
DDataProcessing.ts82 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,
/developtools/profiler/device/cmds/src/
Dmain.cpp222 bool CheckStartSession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckStartSession() argument
227 startRequest.set_session_id(sessionId); in CheckStartSession()
238 bool CheckStopSession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckStopSession() argument
243 stopRequest.set_session_id(sessionId); in CheckStopSession()
253 bool CheckDestroySession(std::unique_ptr<IProfilerService::Stub>& profilerStub, uint32_t& sessionId) in CheckDestroySession() argument
258 destroyRequest.set_session_id(sessionId); in CheckDestroySession()
304 uint32_t sessionId = CreateSession(profilerStub, config, keepSecond, outputFile); in DoCapture() local
305 if (sessionId == 0) { in DoCapture()
311 return CheckDestroySession(profilerStub, sessionId); in DoCapture()
316 …std::thread keepSessionThread(StartThread, std::ref(profilerStub), std::ref(sessionId), std::ref(s… in DoCapture()
[all …]
/developtools/hdc/hdc_rust/src/cffi/
Dserial_struct.h30 uint32_t sessionId; member
39 oss << " sessionId:" << sessionId; in ToDebugString()
94 uint32_t sessionId; member
149 uint32_t sessionId; member
156 uint32_t sessionId; member
224 Field<fieldThree, &BaseStruct::SessionHandShake::sessionId>("sessionId"),

123