Skip to content

Commit

Permalink
Added examples to dev-notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Neumeyer committed Apr 4, 2011
1 parent 4cc3c5f commit fdb4f1b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions dev-notes.txt
Expand Up @@ -50,3 +50,44 @@ io.s4.example.speech01.Speech < $IMAGE_BASE/testinput/speech.in

$IMAGE_BASE/s4-driver/scripts/inject.sh localhost 2334 RawSentence \
io.s4.example.speech01.Sentence < $IMAGE_BASE/testinput/sentence.in


## Receiving Events

# Follow same steps as before to start S4 server and client adapter.

# Start a reader client.

perl $IMAGE_BASE/s4-driver/scripts/read.pl \
'{
readMode => "select",
readInclude => ["SentenceJoined"]
}'

# In a different window, inject messages like in the previous section.

# Remember to initialize the environment variables in the new shell.
export IMAGE_BASE=`pwd`'/build/s4-image'
export PYTHONPATH=${IMAGE_BASE}/s4-driver/lib/python
export PERLLIB=${IMAGE_BASE}/s4-driver/lib/perl

# Inject events.
perl $IMAGE_BASE/s4-driver/scripts/inject.pl RawSpeech \
io.s4.example.speech01.Speech < $IMAGE_BASE/testinput/speech.in

perl $IMAGE_BASE/s4-driver/scripts/inject.pl RawSentence \
io.s4.example.speech01.Sentence < $IMAGE_BASE/testinput/sentence.in


## Request-Response

# Example 1: query the prototype of the joiner (SentenceJoinPE)
# in the speech02 application.
python $IMAGE_BASE/s4-driver/scripts/request.py '#sentenceJoinPE' \
'io.s4.message.PrototypeRequest' < $IMAGE_BASE/testinput/proto-query

# Example 2: request to a single PE from
python $IMAGE_BASE/s4-driver/scripts/request.py '#sentenceJoinPE' \
'io.s4.message.SinglePERequest' < $IMAGE_BASE/testinput/pe-query


0 comments on commit fdb4f1b

Please sign in to comment.