Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bang-olufsen/yahdlc
yahdlc - Yet Another HDLC implementation
https://github.com/bang-olufsen/yahdlc
c communication hdlc protocol serial
Last synced: 5 days ago
JSON representation
yahdlc - Yet Another HDLC implementation
- Host: GitHub
- URL: https://github.com/bang-olufsen/yahdlc
- Owner: bang-olufsen
- License: mit
- Created: 2015-09-18T07:02:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-28T11:25:05.000Z (11 months ago)
- Last Synced: 2024-04-14T07:41:11.174Z (10 months ago)
- Topics: c, communication, hdlc, protocol, serial
- Language: C++
- Homepage:
- Size: 49.8 KB
- Stars: 71
- Watchers: 60
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yahdlc - Yet Another HDLC
[![Build Status](https://travis-ci.org/bang-olufsen/yahdlc.svg)](https://travis-ci.org/bang-olufsen/yahdlc) [![Coverage Status](https://coveralls.io/repos/bang-olufsen/yahdlc/badge.svg?branch=master&service=github)](https://coveralls.io/github/bang-olufsen/yahdlc?branch=master) [![Scan_Coverity](https://img.shields.io/coverity/scan/12502.svg)](scan) [![License](https://img.shields.io/badge/license-MIT_License-blue.svg?style=flat)](LICENSE)
The Yet Another High-Level Data Link Control implementation is a framing protocol optimized for embedded communication with single pass operations. It uses the HDLC asynchronous framing format. For more information see:
https://en.wikipedia.org/wiki/High-Level_Data_Link_Control
The supported frames are limited to DATA (I-frame with Poll bit), ACK (S-frame Receive Ready with Final bit) and NACK (S-frame Reject with Final bit). All DATA frames must be acknowledged or negative acknowledged using the defined ACK and NACK frames. The Address and Control fields uses the 8-bit format which means that the highest sequence number is 7. The FCS field is 16-bit by default, but can be set to 32-bit by the definition of "CRC32".
Below are some examples on the usage:
```
Acknowledge of frames:
A ----> B DATA [Seq No = 1]
A <---- B DATA [Seq No = 4]
A <---- B ACK [Seq No = 2]
A ----> B ACK [Seq No = 5]Negative acknowledge of frame:
A ----> B DATA [Seq No = 1]
A <---- B NACK [Seq No = 1]
A ----> B DATA [Seq No = 1]Acknowledge frame lost:
A ----> B DATA [Seq No = 1]
A X<-- B ACK [Seq No = 2]
*Timeout*
A ----> B DATA [Seq No = 1]
```## Programming languages
Currently yahdlc supports C/C++ and Python. Python bindings for yahdlc has been implemented by SkypLabs and can be found here:
https://github.com/SkypLabs/python4yahdlc