aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-07-29 18:11:19 -0700
committerJakob Odersky <jakob@odersky.com>2016-07-29 18:11:19 -0700
commit5bed191c7c0d68f4d12de0f327ab00f241513008 (patch)
tree6b12912ef9259d01046744dab7cacd69ab1d0445
parenta09951ca6fd429efeeaa52967384ceb8913b7873 (diff)
downloadakka-serial-5bed191c7c0d68f4d12de0f327ab00f241513008.tar.gz
akka-serial-5bed191c7c0d68f4d12de0f327ab00f241513008.tar.bz2
akka-serial-5bed191c7c0d68f4d12de0f327ab00f241513008.zip
Update documentation
-rw-r--r--documentation/3.0/developer.md45
-rw-r--r--documentation/index.md6
2 files changed, 48 insertions, 3 deletions
diff --git a/documentation/3.0/developer.md b/documentation/3.0/developer.md
index 641724f..3f74890 100644
--- a/documentation/3.0/developer.md
+++ b/documentation/3.0/developer.md
@@ -2,6 +2,10 @@
layout: page
title: Developer Guide
---
+# Content
+* TOC
+{:toc}
+
# Building from Source
A complete build of flow involves two parts
@@ -56,6 +60,47 @@ The project and package versions follow a [semantic](http://semver.org/) pattern
Usually (following most Linux distribution's conventions), shared libraries produced by a project `name` of version `M.m.p` are named `libname.so.M.m.p`. However, since when accessing shared libraries through the JVM, only the `name` can be specified and no particular version, the convention adopted by flow is to append `M` to the library name and always keep the major version at zero. E.g. `libflow.so.3.1.2` becomes `libflow3.so.0.1.2`.
+# Testing
+
+`flow-samples` directory contains fully functional application examples of flow. To run an example, change to the base directory of flow and run sbt samples<SampleName>/run.
+All projects, including samples, can be listed by running sbt projects.
+
+To be able connect You can use real device (arduino) burned with sample-echo (`dev/arduino-terminal`) code, or create Virtual Serial Port pair
+
+[socat (SOcket CAT)](http://www.dest-unreach.org/socat/) – multipurpose relay – is a command line based utility that establishes two bidirectional byte streams and transfers data between them.
+socat is #4 on the Top 100 Network Security Tools list, available in most distro repositories (on Debian/Ubuntu sudo apt-get install socat does the trick), really light on resources, and very efficient.
+
+To create a pair of VSP’s
+```socat -d -d pty,raw,echo=0 pty,raw,echo=0```
+
+you will get something like
+```
+socat[5894] N PTY is /dev/ttys002
+socat[5894] N PTY is /dev/ttys003
+socat[5894] N starting data transfer loop with FDs [5,5] and [7,7]
+```
+and that’s it! As long as the socat is running, you have a pair of VSP’s open (their names are printed by socat on initialization). See [socat man page](http://www.dest-unreach.org/socat/doc/socat.html) for more details on what the above command does.
+Now You can connect to first socket ( in this case `/dev/ttys002`) using some sample (or Your code), and use second for monitoring or/and sending messages
+To send - use command
+```
+echo 'Hello World' > /dev/ttys003
+```
+To listen - use command
+```
+cat < /dev/ttys003
+```
+
+Connecting executable and VSP
+```
+socat -d -d pty,raw,echo=0 "exec:myprog ...,pty,raw,echo=0"
+```
+where the executable `myprog` will be connected with the VSP through stdio.
+
+For example Echo-server would look like
+```
+socat -d -d pty,raw,echo=0 "exec:/bin/cat,pty,raw,echo=0"
+```
+
# Publishing and Releasing
The release process is managed with the `sbt-release` plugin. See 'project/Release.scala' for a description of the various steps involved.
diff --git a/documentation/index.md b/documentation/index.md
index f5a1bdf..4c9e59c 100644
--- a/documentation/index.md
+++ b/documentation/index.md
@@ -27,12 +27,12 @@ Start by reading the manual and checking out some examples.
- <i class="fa fa-book"></i> [Examples](https://github.com/jodersky/flow/tree/master/flow-samples)
See some very simple, working demo applications.
+- <i class="fa fa-book"></i> [Developer Guide]({{site.version_docs}}/developer)
+ Instructions on building, testing and publishing flow.
+
- <i class="fa fa-code"></i> [API documentation]({{site.version_docs}}/api/index.html#ch.jodersky.flow.Serial$)
Browse flow's API.
-- <i class="fa fa-book"></i> [Developer Guide]({{site.version_docs}}/developer)
- Instructions on building and publishing flow.
-
## Help
Have a question or suggestion? Found a bug? There are several channels to get help.