Skip to content

数据链路层协议,只需要提供单字节的收发函数就可以移植这些协议。Data link layer protocols can be transplanted by providing a single byte transceiver function.

License

Notifications You must be signed in to change notification settings

ZhuYanzhen1/CDTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Transmit Protocol

Version  Build  License        English / 中文

    This project is a derivative version of a lightweight data transmission protocol proposed and developed by the author when he participated in Robomaster high school summer camp in senior three. The main purpose is to realize the function of the transport layer. This protocol can be applied to various physical layers, such as UART, SPI, IIC, etc., which provides a guarantee for sequential data transmission. According to the requirements of the amount of data transmitted, the author divides the protocol into the following three different versions:

    Note: please choose a small data transmission protocol when the transmission capacity is met, because the larger the data transmission protocol, the larger the stack, the more complex the protocol processing and the greater the error probability, which is reflected in the longer interrupt occupation time (geometric increase) and the easier the stack overflow on the microcontroller.


Porting Code:

  1. Porting files "encrypt.c,encrypt.h,decrypt.c,decrypt.h,ioctrl.c,ioctrl.h" into your project
  2. Realize the single byte transmit function in "ioctrl.c", which function name is common_sendbyte.
  3. After receiving a byte,call the "common_receivebyte" function in "decrypt.c", as well deliver the received byte to buf.
  4. After finished the previous steps,call the "xdtp_data_transmit" function to send a package; it'll trig the "xdtp_callback_handler" function in "ioctrl.c" if received a package.

Bugs & Feature Requests

Please report bugs and request features using the Issue Tracker and follow these request:

  1. Tab highlight when on different tab.
  2. Don’t let the update disappear if the window is not in focus.

License

The source code is released under a AGPL-3.0 License.

Affiliation:AcmeTech
Author: Yanzhen Zhu
Maintainer:YanzhenZhu, [email protected]

The product has been tested under Windows 10 and Ubuntu 22.04 LTS. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.

About

数据链路层协议,只需要提供单字节的收发函数就可以移植这些协议。Data link layer protocols can be transplanted by providing a single byte transceiver function.

Topics

Resources

License

Stars

Watchers

Forks

Languages