Home
last modified time | relevance | path

Searched refs:UartHead (Results 1 – 7 of 7) sorted by relevance

/developtools/hdc/test/unittest/common/
Duart_test.cpp35 bool MakeData(std::vector<uint8_t> &data, UartHead &head);
70 MOCK_METHOD1(ProcessResponsePackage, void(const UartHead &));
135 UartHead head; in MakeRndData()
151 UartHead head; in MakeDemoData()
156 data.resize(sizeof(UartHead) + testString.size()); in MakeDemoData()
162 bool HdcUARTBaseTest::MakeData(std::vector<uint8_t> &data, UartHead &head) in MakeData()
165 if (memcpy_s(data.data(), data.size(), &head, sizeof(UartHead)) != EOK) { in MakeData()
170 unsigned char *dataPtr = data.data() + sizeof(UartHead); in MakeData()
171 size_t dataSize = data.size() - sizeof(UartHead); in MakeData()
237 size_t maxSendSize = MAX_UART_SIZE_IOBUF - sizeof(UartHead);
[all …]
Ddaemon_uart_test.cpp104 data.resize(sizeof(UartHead) + data.size()); in PrepareDeamonReadThreadData()
448 EXPECT_CALL(mockDaemonUART, PackageProcess).Times(1).WillOnce(Return(sizeof(UartHead)));
474 EXPECT_CALL(mockDaemonUART, PackageProcess).Times(1).WillOnce(Return(sizeof(UartHead)));
499 EXPECT_CALL(mockDaemonUART, PackageProcess).Times(1).WillOnce(Return(sizeof(UartHead)));
527 EXPECT_CALL(mockDaemonUART, PackageProcess).Times(1).WillOnce(Return(sizeof(UartHead)));
582 MockUartDevSender(fds[SENDER], data.data(), sizeof(UartHead), 1000ms, false);
608 EXPECT_CALL(mockDaemonUART, PackageProcess).Times(1).WillOnce(Return(sizeof(UartHead)));
Dhost_uart_test.cpp500 UartHead *argUartHead = reinterpret_cast<UartHead *>(arg);
511 UartHead resetPackage;
514 resetPackage.dataSize = sizeof(UartHead);
518 RequestSendPackage(EqUartHead(&resetPackage), sizeof(UartHead), false))
676 readBuf.resize(sizeof(UartHead)); in __anona7a4f2970f02()
686 const size_t testDataSize = sizeof(UartHead) * 2;
/developtools/hdc/src/common/
Duart.h44 struct UartHead { struct
45 UartHead(const UartHead &) = delete;
46 UartHead &operator=(const UartHead &) = delete; argument
47 UartHead(UartHead &&) = default;
83 UartHead(uint32_t sessionIdIn = 0, uint8_t optionIn = 0, uint32_t dataSizeIn = 0,
92 bool operator==(const UartHead &r) const
105 const uint8_t *data = reinterpret_cast<const uint8_t *>(this) + sizeof(UartHead); in UpdateCheckSum() argument
109 size_t headCheckSumLen = sizeof(UartHead) - sizeof(headCheckSum); in UpdateCheckSum()
117 size_t headCheckSumLen = sizeof(UartHead) - sizeof(headCheckSum); in ValidateHead() argument
126 const uint8_t *data = reinterpret_cast<const uint8_t *>(this) + sizeof(UartHead); in ValidateData() argument
[all …]
Duart.cpp341 WRITE_LOG(LOG_ALL, "%s %d data %x %x", __FUNCTION__, length, *(data + sizeof(UartHead)), in WriteUartDev()
342 *(data + sizeof(UartHead) + 1)); in WriteUartDev()
447 while (data.size() >= sizeof(UartHead)) { in PackageProcess()
456 } else if (packetSize == sizeof(UartHead)) { in PackageProcess()
515 return data.size() > 1 ? sizeof(UartHead) : 0; in PackageProcess()
520 struct UartHead *uartHeader = (struct UartHead *)data; in SendUARTRaw()
567 if (size < sizeof(UartHead)) { in UartSendToHdcStream()
572 UartHead *head = reinterpret_cast<UartHead *>(data); in UartSendToHdcStream()
574 head->ToDebugString().c_str(), *(data + sizeof(UartHead)), in UartSendToHdcStream()
575 *(data + sizeof(UartHead) + 1)); in UartSendToHdcStream()
[all …]
/developtools/hdc/src/host/
Dhost_uart.cpp103 if (dataReadBuf.size() < sizeof(UartHead)) { in UartReadThread()
760 UartHead resetPackage(sessionId, PKG_OPTION_RESET); in EnumSerialPort()
761 resetPackage.dataSize = sizeof(UartHead); in EnumSerialPort()
762 RequestSendPackage(reinterpret_cast<uint8_t *>(&resetPackage), sizeof(UartHead), false); in EnumSerialPort()
/developtools/hdc/src/daemon/
Ddaemon_uart.cpp264 if (dataReadBuf.size() < sizeof(UartHead)) { in DeamonReadThread()