forked from beweinreich/xmodem
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated README with source path descriptions
* updated xmodem receiver states to match diagram
- Loading branch information
1 parent
2c2d33a
commit c88838b
Showing
11 changed files
with
367 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Setup Environment - Ubuntu 16.10 | |
sudo apt-get install build-essential socat lrzsz minicom ant git libgtest-dev cmake | ||
``` | ||
|
||
Build and install libXMODEM | ||
Build and install libXMODEM | ||
-------------------------------- | ||
```bash | ||
git clone [email protected]:caseykelso/xmodem.git | ||
|
@@ -22,7 +22,7 @@ make install -j8 | |
``` | ||
|
||
# Development | ||
For developers looking to extend, bug fix, build, and test libXMODEM with dependencies and test infrastructure included in the source tree. | ||
For developers looking to extend, bug fix, build, and test libXMODEM with dependencies and test infrastructure included in the source tree. The complete source tree grabs third party repos, standalone command line application code, serial port lib, and gtest. | ||
|
||
Setup Environment - OSX | ||
------------------------ | ||
|
@@ -76,7 +76,7 @@ make | |
``` | ||
|
||
Build Library - Bare Metal | ||
-------------------------- | ||
-------------------------- | ||
TBD | ||
|
||
# Tests | ||
|
@@ -89,7 +89,11 @@ Build & Run Unit Tests | |
ant tests | ||
``` | ||
|
||
Unit testing is implemented with Google's GTest. | ||
## High-level Tests | ||
Open a terminal | ||
```bash | ||
ant tests_system | ||
``` | ||
|
||
### Transmit State Machine | ||
All transitions are covered via unit tests. | ||
|
@@ -101,9 +105,74 @@ All transitions are covered via unit tests. | |
|
||
<img src="documentation/xmodem_receive_fsm.png" /> | ||
|
||
## High-level Tests | ||
Open a terminal | ||
|
||
# Project Structure | ||
## Source Directories | ||
* /source - libxmodem source directory | ||
* xmodem.h - common header (transmitter and receiver) | ||
* xmodem.c - common implementation (transmitter and receiver) | ||
* xmodem_receiver.h - receiver side header | ||
* xmodem_receiver.c - receiver side implementation | ||
* xmodem_transmitter.h - transmitter side header | ||
* xmodem_transmitter.c - transmitter side implementation | ||
|
||
|
||
* /app - application level source directory | ||
* CMakeLists.txt - cmake build configuration for the commandline app | ||
* main.cpp - main application source code file | ||
* serialport.cpp - thin abstraction for asio serialport | ||
* serialport.h - header for thin abstraction for asio serialport | ||
|
||
|
||
* /tests | ||
* CMakeLists.txt - cmake build configuration for the test runner | ||
* test.cpp - libxmodem test implementation | ||
* XModemTests.cpp - gtest test suite (implementation is in header) | ||
* XModemTests.h - gtest test suite definition and SetUp() TearDown() implementation | ||
|
||
|
||
* /tests.tmp - temporary folder for test files and virtual serial port nodes | ||
|
||
|
||
* / | ||
* build.xml - ant build configuration for aggregate project (only used for standalone dev purposes not integration). Allows for easy development in Linux, OSX, and Windows | ||
* CMakeLists.txt - libxmodem cmake build configuration, used for integrators who wish to clone just the libxmodem source tree without using git-repo for aggregation. | ||
* README.md - this file | ||
* xmodem.xml - git-repo manifest definition to aggregate all project dependencies for libxmodem development purposes | ||
* .gitignore - definitions of files and directories to be ignored by git | ||
|
||
|
||
## Third Party Source Directories | ||
* /asio - boost asynchronous IO standalone implementation | ||
* /cmake - latest cmake build tool - tip of master branch | ||
* /docopt - library for commandline switches | ||
* /gtest - google test library | ||
|
||
## Build Directories | ||
* build - libxmodem library build directory | ||
* build.app - application build directory | ||
* build.docopt - libdocopt build directory | ||
* build.tests - unit test runner build directory | ||
* build.gtest - google test build directory | ||
|
||
# Commandline Application Usage | ||
```bash | ||
ant tests_system | ||
nanoXmodem: | ||
|
||
Usage: | ||
x --port=<port> --receive --file=<filename> [--baud=<baudrate>] | ||
x --port=<port> --transmit --file=<filename> [--baud=<baudrate>] | ||
x --enumerate | ||
x (-h | --help) | ||
x --version | ||
|
||
Options: | ||
-h --help Show this screen. | ||
--version Show version. | ||
--port=<comport> Path to comport. | ||
--baud=<baudrate> Baudrate [default: 115200]. | ||
--receive Start transfer as receiver. | ||
--transmit Start file transmission. | ||
--enumerate Enumerate list of available ports. | ||
--file=<filename> File to send. | ||
``` | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.