Home
last modified time | relevance | path

Searched refs:bufPtr (Results 1 – 18 of 18) sorted by relevance

/developtools/hdc/src/test/
Dut_mod.cpp24 uint8_t *bufPtr = nullptr; in TestBaseCommand() local
30 reinterpret_cast<void **>(&bufPtr), 0)) < 0) { in TestBaseCommand()
33 if (!strcmp("0", reinterpret_cast<char *>(bufPtr))) { in TestBaseCommand()
34 delete[] bufPtr; in TestBaseCommand()
35 bufPtr = nullptr; in TestBaseCommand()
38 delete[] bufPtr; in TestBaseCommand()
39 bufPtr = nullptr; in TestBaseCommand()
44 reinterpret_cast<void **>(&bufPtr), 0)) < expert) { in TestBaseCommand()
47 if (strcmp(MESSAGE_SUCCESS.c_str(), reinterpret_cast<char *>(bufPtr))) { in TestBaseCommand()
50 delete[] bufPtr; in TestBaseCommand()
[all …]
/developtools/hdc/src/common/
Dtask.cpp55 bool HdcTaskBase::SendToAnother(const uint16_t command, uint8_t *bufPtr, const int size) in SendToAnother() argument
63 channelBase->SendWithCmd(taskInfo->channelId, command, bufPtr, size); in SendToAnother()
67 … return sessionBase->Send(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size) > 0; in SendToAnother()
99 bool HdcTaskBase::ServerCommand(const uint16_t command, uint8_t *bufPtr, const int size) in ServerCommand() argument
102 return hSession->ServerCommand(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size); in ServerCommand()
106 int HdcTaskBase::ThreadCtrlCommunicate(const uint8_t *bufPtr, const int size) in ThreadCtrlCommunicate() argument
121 return Base::SendToPollFd(fd, bufPtr, size); in ThreadCtrlCommunicate()
Dchannel.h32 …void SendWithCmd(const uint32_t channelId, const uint16_t commandFlag, uint8_t *bufPtr, const int …
44 virtual int ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) in ReadChannel() argument
49 void Send(const uint32_t channelId, uint8_t *bufPtr, const int size);
50 void SendChannel(HChannel hChannel, uint8_t *bufPtr, const int size);
51 …void SendChannelWithCmd(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int …
52 void EchoToClient(HChannel hChannel, uint8_t *bufPtr, const int size);
Dtask.h39 …bool SendToAnother(const uint16_t command, uint8_t *bufPtr, const int size); // D / S corresponds…
41 …bool ServerCommand(const uint16_t command, uint8_t *bufPtr, const int size); // D / s command is …
42 …int ThreadCtrlCommunicate(const uint8_t *bufPtr, const int size); // main thread and s…
Dchannel.cpp264 …:SendChannelWithCmd(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int size) in SendChannelWithCmd() argument
277 if (size > 0 && memcpy_s(data + sizeof(commandFlag), size, bufPtr, size)) { in SendChannelWithCmd()
286 …:SendWithCmd(const uint32_t channelId, const uint16_t commandFlag, uint8_t *bufPtr, const int size) in SendWithCmd() argument
297 SendChannelWithCmd(hChannel, commandFlag, bufPtr, size); in SendWithCmd()
302 void HdcChannelBase::SendChannel(HChannel hChannel, uint8_t *bufPtr, const int size) in SendChannel() argument
312 if (memcpy_s(data + DWORD_SERIALIZE_SIZE, sizeNewBuf - DWORD_SERIALIZE_SIZE, bufPtr, size)) { in SendChannel()
330 void HdcChannelBase::Send(const uint32_t channelId, uint8_t *bufPtr, const int size) in Send() argument
341 SendChannel(hChannel, bufPtr, size); in Send()
520 void HdcChannelBase::EchoToClient(HChannel hChannel, uint8_t *bufPtr, const int size) in EchoToClient() argument
530 if (memcpy_s(data + DWORD_SERIALIZE_SIZE, sizeNewBuf - DWORD_SERIALIZE_SIZE, bufPtr, size)) { in EchoToClient()
Dforward.h79 bool SendToTask(const uint32_t cid, const uint16_t command, uint8_t *bufPtr, const int bufSize);
83 int SendForwardBuf(HCtxForward ctx, uint8_t *bufPtr, const int size);
Dsession.cpp756 int HdcSessionBase::SendByProtocol(HSession hSession, uint8_t *bufPtr, const int bufLen, bool echo ) in SendByProtocol() argument
768 ret = pTCP->WriteUvTcpFd(&hSession->hChildWorkTCP, bufPtr, bufLen); in SendByProtocol()
771 ret = pTCP->WriteUvTcpFd(&hSession->hWorkTCP, bufPtr, bufLen); in SendByProtocol()
773 ret = pTCP->WriteUvTcpFd(&hSession->hChildWorkTCP, bufPtr, bufLen); in SendByProtocol()
780 ret = pUSB->SendUSBBlock(hSession, bufPtr, bufLen); in SendByProtocol()
781 delete[] bufPtr; in SendByProtocol()
787 ret = pUART->SendUARTData(hSession, bufPtr, bufLen); in SendByProtocol()
788 delete[] bufPtr; in SendByProtocol()
882 int HdcSessionBase::OnRead(HSession hSession, uint8_t *bufPtr, const int bufLen) in OnRead() argument
886 if (memcmp(bufPtr, PACKET_FLAG.c_str(), PACKET_FLAG.size())) { in OnRead()
[all …]
Dsession.h91 int OnRead(HSession hSession, uint8_t *bufPtr, const int bufLen);
94 int SendByProtocol(HSession hSession, uint8_t *bufPtr, const int bufLen, bool echo = false);
113 uint8_t *bufPtr, const int size) in ServerCommand() argument
Dforward.cpp207 bool HdcForwardBase::SendToTask(const uint32_t cid, const uint16_t command, uint8_t *bufPtr, const … in SendToTask() argument
220 if (bufSize > 0 && bufPtr != nullptr && memcpy_s(newBuf + 4, bufSize, bufPtr, bufSize) != EOK) { in SendToTask()
684 int HdcForwardBase::SendForwardBuf(HCtxForward ctx, uint8_t *bufPtr, const int size) in SendForwardBuf() argument
698 (void)memcpy_s(pDynBuf, size, bufPtr, size); in SendForwardBuf()
/developtools/hdc/src/host/
Dserver_for_client.h37 int ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) override;
43 …bool SendToDaemon(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int bufSiz…
44 int BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO);
56 int ChannelHandShake(HChannel hChannel, uint8_t *bufPtr, const int bytesIO);
Dserver_for_client.cpp198 …nt::SendToDaemon(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int bufSize) in SendToDaemon() argument
214 …if (ptrServer->Send(hdi->hSession->sessionId, hChannel->channelId, commandFlag, bufPtr, bufSize) <… in SendToDaemon()
704 int HdcServerForClient::BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) in BindChannelToSession() argument
755 int HdcServerForClient::ChannelHandShake(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) in ChannelHandShake() argument
758 rebuildHandshake.insert(rebuildHandshake.end(), bufPtr, bufPtr + bytesIO); in ChannelHandShake()
796 int HdcServerForClient::ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) in ReadChannel() argument
800 return ChannelHandShake(hChannel, bufPtr, bytesIO); in ReadChannel()
803 uint16_t command = *reinterpret_cast<uint16_t *>(bufPtr); in ReadChannel()
806 … if (!SendToDaemon(hChannel, command, bufPtr + sizeof(uint16_t), bytesIO - sizeof(uint16_t))) { in ReadChannel()
813 … string retEcho = String2FormatCommand(reinterpret_cast<char *>(bufPtr), bytesIO, &formatCommand); in ReadChannel()
[all …]
Dserver.h52 …ommand(const uint32_t sessionId, const uint32_t channelId, const uint16_t command, uint8_t *bufPtr,
Dserver.cpp920 uint8_t *bufPtr, const int size) in ServerCommand() argument
928 return FetchCommand(hSession, channelId, command, bufPtr, size); in ServerCommand()
/developtools/hdc/test/unittest/common/
Duart_test.cpp531 uint8_t *bufPtr = reinterpret_cast<uint8_t *>(&testHead); variable
539 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
548 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
555 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
564 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
572 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
580 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
591 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
602 buffer.assign(bufPtr, bufPtr + sizeof(UartHead));
/developtools/hdc/test/unittest/common/include/
DHdcJdwpTest.h37 uint8_t *bufPtr, const int size) in ServerCommand() argument
/developtools/hdc/src/daemon/
Ddaemon_usb.cpp515 uint8_t *bufPtr = ctxIo->buf; in OnUSBRead() local
545 if (thisClass->JumpAntiquePacket(*bufPtr, bytesIOBytes)) { in OnUSBRead()
551 …if ((childRet = thisClass->AvailablePacket((uint8_t *)bufPtr, bytesIOBytes, &sessionId)) != RET_SU… in OnUSBRead()
553 … WRITE_LOG(LOG_WARN, "AvailablePacket check failed, ret:%d buf:%-50s", bytesIOBytes, bufPtr); in OnUSBRead()
560 … if ((childRet = thisClass->DispatchToWorkThread(sessionId, bufPtr, bytesIOBytes)) < 0) { in OnUSBRead()
Ddaemon.h35 …ommand(const uint32_t sessionId, const uint32_t channelId, const uint16_t command, uint8_t *bufPtr,
Ddaemon.cpp460 uint8_t *bufPtr, const int size) in ServerCommand() argument
462 return Send(sessionId, channelId, command, reinterpret_cast<uint8_t *>(bufPtr), size) > 0; in ServerCommand()