Home
last modified time | relevance | path

Searched refs:UartHead (Results 1 – 13 of 13) 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.cpp501 UartHead *argUartHead = reinterpret_cast<UartHead *>(arg);
512 UartHead resetPackage;
515 resetPackage.dataSize = sizeof(UartHead);
519 RequestSendPackage(EqUartHead(&resetPackage), sizeof(UartHead), false))
677 readBuf.resize(sizeof(UartHead)); in __anon316535560f02()
687 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.cpp348 WRITE_LOG(LOG_ALL, "%s %d data %x %x", __FUNCTION__, length, *(data + sizeof(UartHead)), in WriteUartDev()
349 *(data + sizeof(UartHead) + 1)); in WriteUartDev()
454 while (data.size() >= sizeof(UartHead)) { in PackageProcess()
463 } else if (packetSize == sizeof(UartHead)) { in PackageProcess()
522 return data.size() > 1 ? sizeof(UartHead) : 0; in PackageProcess()
527 struct UartHead *uartHeader = (struct UartHead *)data; in SendUARTRaw()
574 if (size < sizeof(UartHead)) { in UartSendToHdcStream()
579 UartHead *head = reinterpret_cast<UartHead *>(data); in UartSendToHdcStream()
581 head->ToDebugString().c_str(), *(data + sizeof(UartHead)), in UartSendToHdcStream()
582 *(data + sizeof(UartHead) + 1)); in UartSendToHdcStream()
[all …]
/developtools/hdc/hdc_rust/src/transfer/
Duart.rs24 use crate::serializer::native_struct::UartHead;
82 pub head: Option<UartHead>,
120 let mut head = serializer::native_struct::UartHead::default(); in check_protocol_head()
162 UartHead { in build_header()
179 ) -> UartHead { in build_header_obj() argument
180 UartHead { in build_header_obj()
Duart_wrapper.rs20 use crate::serializer::native_struct::UartHead;
451 pub async fn on_read_head(head: UartHead) { in on_read_head() argument
/developtools/hdc/hdc_rust/src/cffi/
Dserial_struct.cpp138 extern "C" SerializedBuffer SerializeUartHead(RustStruct::UartHead &value) in SerializeUartHead()
248 extern "C" uint8_t ParseUartHead(RustStruct::UartHead &value, SerializedBuffer buf) in ParseUartHead()
250 (void)memcpy_s(&value, buf.size, reinterpret_cast<struct UartHead *>(buf.ptr), buf.size); in ParseUartHead()
Dserial_struct.h153 struct UartHead { struct
/developtools/hdc/hdc_rust/src/serializer/
Dnative_struct.rs47 pub struct UartHead { struct
Dserialize.rs28 use super::native_struct::UartHead;
390 impl Serialization for UartHead { implementation
/developtools/hdc/src/host/
Dhost_uart.cpp103 if (dataReadBuf.size() < sizeof(UartHead)) { in UartReadThread()
768 UartHead resetPackage(sessionId, PKG_OPTION_RESET); in EnumSerialPort()
769 resetPackage.dataSize = sizeof(UartHead); in EnumSerialPort()
770 RequestSendPackage(reinterpret_cast<uint8_t *>(&resetPackage), sizeof(UartHead), false); in EnumSerialPort()
/developtools/hdc/src/daemon/
Ddaemon_uart.cpp263 if (dataReadBuf.size() < sizeof(UartHead)) { in DeamonReadThread()