diff options
author | Jakob Odersky <jodersky@gmail.com> | 2013-06-22 16:11:45 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2013-06-22 16:12:18 +0200 |
commit | 14ffa05cc49eaf7904865fb3dd35cc8984c52d79 (patch) | |
tree | 26e9d985b014415b1c2a0698261cd28a1ca5fb14 | |
parent | 64564e487b6f6003f64b3f4910ca041136a3d18e (diff) | |
download | akka-serial-14ffa05cc49eaf7904865fb3dd35cc8984c52d79.tar.gz akka-serial-14ffa05cc49eaf7904865fb3dd35cc8984c52d79.tar.bz2 akka-serial-14ffa05cc49eaf7904865fb3dd35cc8984c52d79.zip |
move sample to seperate folder
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | project/Build.scala | 4 | ||||
-rw-r--r-- | samples/arduino/README | 1 | ||||
-rw-r--r-- | samples/rwc/README | 1 | ||||
-rw-r--r-- | samples/rwc/src/main/scala/com/github/jodersky/flow/example/Main.scala (renamed from samples/src/main/scala/com/github/jodersky/flow/example/Main.scala) | 4 | ||||
-rw-r--r-- | samples/rwc/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala (renamed from samples/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala) | 0 |
6 files changed, 7 insertions, 5 deletions
@@ -10,7 +10,7 @@ Since hardware is involved in serial communication, a Scala-only solution is not ## Build & usage Run sbt in the root directory and switch to project 'flow', by typing 'project flow'. Running 'package' will compile both Scala and native sources and bundle them in the standard jar file. When using the jar in another application, the native library will be automatically extracted and loaded (i.e. no -Djava.library.path or other system parameters have to be set). -To see an example, switch to project 'flow-samples' and then type 'run'. Don't forget to connect a serial device (such as an arduino) before runinng the example. +To see an example, switch to project 'flow-rwc' and then type 'run'. Don't forget to connect a serial device (such as an arduino) before runinng the example. The build currently only works on Linux. diff --git a/project/Build.scala b/project/Build.scala index a0f0baa..4026ba7 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -31,8 +31,8 @@ object FlowBuild extends Build { ) ++ Jni.defaultSettings) lazy val samples = Project( - id = "flow-samples", - base = file("samples"), + id = "flow-rwc", + base = file("samples") / "rwc", settings = buildSettings ++ runSettings ++ Seq(libraryDependencies ++= Dependencies.all)).dependsOn(main) lazy val buildSettings = Defaults.defaultSettings ++ Seq( diff --git a/samples/arduino/README b/samples/arduino/README new file mode 100644 index 0000000..64c8a5c --- /dev/null +++ b/samples/arduino/README @@ -0,0 +1 @@ +Code to run on an arduino for serial communication testing. diff --git a/samples/rwc/README b/samples/rwc/README new file mode 100644 index 0000000..843e38d --- /dev/null +++ b/samples/rwc/README @@ -0,0 +1 @@ +This sample tests a read(loop)-write-close procedure. diff --git a/samples/src/main/scala/com/github/jodersky/flow/example/Main.scala b/samples/rwc/src/main/scala/com/github/jodersky/flow/example/Main.scala index 021f638..0a38618 100644 --- a/samples/src/main/scala/com/github/jodersky/flow/example/Main.scala +++ b/samples/rwc/src/main/scala/com/github/jodersky/flow/example/Main.scala @@ -27,7 +27,7 @@ object Main { val baud = 115200 low.Serial.debug(true) - + implicit val system = ActorSystem("flow") val serial = system.actorOf(Props(classOf[SerialHandler], port, baud), name = "serial-handler") @@ -37,7 +37,7 @@ object Main { readLine() serial ! "close" readLine() + system.shutdown() - } }
\ No newline at end of file diff --git a/samples/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala b/samples/rwc/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala index 2f7dfc3..2f7dfc3 100644 --- a/samples/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala +++ b/samples/rwc/src/main/scala/com/github/jodersky/flow/example/SerialHandler.scala |