This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
95 lines (64 loc) · 2.55 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
You can try this to get things quickly up and running.
Prerequisits:
-------------
json-c, glib (optional), nodejs/libuv (optional), systemd (optional)
Compilation
-----------
./bootstrap --prefix=/usr --sysconfdir=/etc --enable-glib --enable-nodejs \
--enable-systemd --enable-nodejs
make
Testing Native Test Client
--------------------------
In a terminal, run
sudo ./src/iot-launch-daemon -f -vvv
In another terminal, run
./src/iot-event-test -s -vvv
In a third terminal, run
./iot-event-test -u kli
In this setup, the client running in terminal two will subscribe
for a bunch of events, dump the event whenever it receives one, and
emit a 'sayonara' event when it receives a 'goodbye' event.
The client running in terminal three will subscribe for the 'sayonara'
event then emit a bunch of events, including ones that are subscribed
for by the other client.
Testing NodeJS Bindings
-----------------------
In a terminal, run
sudo ./src/iot-launch-daemon -f -vvv
In another terminal, run
cd src/nodejs
LD_LIBRARY_PATH=$(pwd)/../.libs node tick-tock.js --tock --dump
In a third terminal, run
cd src/nodejs
LD_LIBRARY_PATH=$(pwd)/../.libs node tick-tock.js --tick --count 20 --delay 250
In this setup, the client running in terminal two will subscribe for
events 'tick' and 'ka-boom'. It will emit a 'tock' whenever it receives
'tick'. Once it receives a 'ka-boom', it will emit itself a 'ka-boom' and
exit. The client in terminal three will subscribe for 'tock' and 'ka-boom'
events. It will emit an initial 'tick' and emit further ones whenever it
receives a 'tock'. Once it receives a 'tock' with an attached count <= 0,
it will emit a 'ka-boom' event and finally exit when it receives a 'ka-boom'.
Testing Python Bindings
-----------------------
# Events
In a terminal, run
sudo ./src/iot-launch-daemon -f -vvv
In another terminal, run
cd src/python/tests
python event-test.py -s -e hi,hello,greetings -vvv -d
In a third terminal, run
cd src/python/tests
python event-test.py -e hi,hello,greetings -vvv -d -I 1000 -n 2 -u YOUR_USER_NAME_HERE
In this setup, the client running in terminal two will subscribe for events
'hi' 'hello' and 'greetings'. It prints debug data whenever it receives an event
The client in terminal three will send two sets of three events
'hi' 'hello' and 'greetings' with some dummy data.
# Listing
In a terminal, run
sudo ./src/iot-launch-daemon -f -vvv
In another terminal, run
cd src/python/tests
python list-apps.py
python list-apps.py -r
The first run lists all applications, whereas the second run lists only running
applications