aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ose/doc/src/ose_signals_chapter.xml
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-21 15:19:53 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:24:07 +0100
commit13ed57745c639f72be8ae1f25fbd206f6e7307f3 (patch)
tree3d12d1c2a19105bc53075a886f02096a982774af /lib/ose/doc/src/ose_signals_chapter.xml
parent08910c59fb8dda35ee3c272d84cba450954fcd24 (diff)
downloadotp-13ed57745c639f72be8ae1f25fbd206f6e7307f3.tar.gz
otp-13ed57745c639f72be8ae1f25fbd206f6e7307f3.tar.bz2
otp-13ed57745c639f72be8ae1f25fbd206f6e7307f3.zip
ose: Expand OSE docs
Diffstat (limited to 'lib/ose/doc/src/ose_signals_chapter.xml')
-rw-r--r--lib/ose/doc/src/ose_signals_chapter.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ose/doc/src/ose_signals_chapter.xml b/lib/ose/doc/src/ose_signals_chapter.xml
index c8d98f4099..ff501777cc 100644
--- a/lib/ose/doc/src/ose_signals_chapter.xml
+++ b/lib/ose/doc/src/ose_signals_chapter.xml
@@ -45,6 +45,29 @@
<marker id="erlang"></marker>
<section>
<title>Signals in Erlang</title>
+ <p>Erlang/OTP on OSE provides a erlang module called
+ <seealso marker="ose:ose">ose</seealso> that can be used to interact
+ with other OSE processes using message passing. The api in the module
+ is very similar to the native OSE api, so for details of how the
+ functions work please refer to the official OSE documenation. Below
+ is an example usage of the API.
+ </p>
+ <code>1> P1 = ose:open("p1").
+#Port&gt;0.344>
+2> ose:hunt(P1,"p2").
+{#Port&gt;0.344>,1}
+3> P2 = ose:open("p2").
+#Port&gt;0.355>
+4> flush().
+Shell got {mailbox_up,#Port&gt;0.344>,{#Port&gt;0.344>,1},852189}
+ok
+5> ose:listen(P1,[1234]).
+ok
+6> ose:send(P2,ose:get_id(P1),1234,&gt;&gt;"hello">>).
+ok
+7> flush().
+Shell got {message,#Port&gt;0.344>,{852189,1245316,1234,&gt;&gt;"hello">>}}
+ok</code>
</section>
<marker id="driver"></marker>