Commit c84c9d3b9be0e2d92fff207f7866e8040187ae6f
1 parent
b280dbd0
Exists in
dev
update doc test et run pour les devices
Showing
2 changed files
with
44 additions
and
32 deletions
Show diff stats
HOWTO_TEST.txt
... | ... | @@ -8,16 +8,20 @@ |
8 | 8 | |
9 | 9 | (A) Running the unit tests suite: |
10 | 10 | - (1) Some unit tests only: |
11 | -./pyros.py test | |
11 | + $ ./pyros.py test | |
12 | 12 | - (2) All unit tests: |
13 | -./pyros.py testall | |
13 | + $ ./pyros.py testall | |
14 | 14 | |
15 | 15 | (B) Test with agents: |
16 | 16 | - (1) Test with agentA and agentB sending commands to each other: |
17 | -./pyros.py -t start agentA,agentB | |
17 | + $ ./pyros.py -t start agentA,agentB | |
18 | 18 | - (2) Test with agentTelescopeRequester sending commands to agentDevice: |
19 | -./pyros.py -t start agentTelescopeRequester,agentDevice | |
19 | + $ ./pyros.py -t start agentTelescopeRequester,agentDevice | |
20 | 20 | |
21 | 21 | (C) Interactive testing: |
22 | -./pyros.py shell | |
22 | + $ ./pyros.py shell | |
23 | 23 | |
24 | +(D) Devices testing: | |
25 | + $ cd src/devices_controller/ | |
26 | +Suivre les instructions du document README.md de ce dossier | |
27 | + | ... | ... |
src/devices_controller/README.md
1 | 1 | |
2 | 2 | ************************ |
3 | -** DEVICES & CHANNELS ** | |
3 | +## DEVICES & CHANNELS | |
4 | 4 | ************************ |
5 | 5 | VERSION: 0.30.0 |
6 | 6 | |
... | ... | @@ -15,11 +15,13 @@ Comment : AgentDevice, AgentTelescopeRequester |
15 | 15 | |
16 | 16 | |
17 | 17 | ******************************************************************************************** |
18 | -1) TEST | |
18 | +# 1) TEST | |
19 | 19 | |
20 | 20 | Pour lancer les TESTS: |
21 | -cd test/ | |
22 | -./test_client_gemini.py | |
21 | + | |
22 | + $ cd test/ | |
23 | + $ ./test_client_gemini.py | |
24 | + (test de connexion locale avec un "simulateur" de Gemini) | |
23 | 25 | |
24 | 26 | Ca doit se terminer par quelque chose comme: |
25 | 27 | Ran 2 tests in 0.013s |
... | ... | @@ -30,11 +32,13 @@ Là, il faut arrêter avec CTRL-C (car je ne sais pas encore comment arrêter le |
30 | 32 | |
31 | 33 | |
32 | 34 | ******************************************************************************************** |
33 | -2) RUN | |
35 | +# 2) RUN | |
34 | 36 | |
35 | 37 | Pour lancer le client sur le telescope Gemini de Alain Klotz: |
36 | -./telescope_controller_gemini_run.py | |
37 | -(Windows: python3 telescope_controller_gemini_run.py) | |
38 | + | |
39 | + $ cd devices_controller_concrete/device_controller_Gemini/ | |
40 | + $ ./client_telescope_controller_gemini_run.py | |
41 | + (Windows: python3 client_telescope_controller_gemini_run.py) | |
38 | 42 | |
39 | 43 | (NB: un log "client.log" est créé et alimenté au fur et à mesure) |
40 | 44 | (Pour avoir moins de détail, mettre la variable DEBUG à False dans le fichier telescope_controller_gemini_run.py) |
... | ... | @@ -42,35 +46,39 @@ Pour lancer le client sur le telescope Gemini de Alain Klotz: |
42 | 46 | |
43 | 47 | Examples of requests: |
44 | 48 | |
45 | -REQUEST TO SERVER (ENTER to quit): >>> :GR# | |
46 | -NATIVE Command to send is ':GR#' | |
47 | -Sent: b'00090000:GR#\x00' | |
48 | -Sent 13 bytes | |
49 | -RECEIVED (ALL BYTES): b'0009000015:01:48#\x00' | |
50 | -RECEIVED (useful data): 15:01:48 | |
51 | - | |
52 | -REQUEST TO SERVER (ENTER to quit): >>> get ra | |
53 | -GENERIC Command to send is get_ra | |
54 | -NATIVE Command to send is ':GR#' | |
55 | -Sent: b'00100000:GR#\x00' | |
56 | -Sent 13 bytes | |
57 | -RECEIVED (ALL BYTES): b'0010000015:01:48#\x00' | |
58 | -RECEIVED (useful data): 15:01:48 | |
59 | -result is 15:01:48 | |
49 | + REQUEST TO SERVER (ENTER to quit): >>> :GR# | |
50 | + NATIVE Command to send is ':GR#' | |
51 | + Sent: b'00090000:GR#\x00' | |
52 | + Sent 13 bytes | |
53 | + RECEIVED (ALL BYTES): b'0009000015:01:48#\x00' | |
54 | + RECEIVED (useful data): 15:01:48 | |
55 | + | |
56 | + REQUEST TO SERVER (ENTER to quit): >>> get ra | |
57 | + GENERIC Command to send is get_ra | |
58 | + NATIVE Command to send is ':GR#' | |
59 | + Sent: b'00100000:GR#\x00' | |
60 | + Sent 13 bytes | |
61 | + RECEIVED (ALL BYTES): b'0010000015:01:48#\x00' | |
62 | + RECEIVED (useful data): 15:01:48 | |
63 | + result is 15:01:48 | |
60 | 64 | |
61 | 65 | |
62 | 66 | |
63 | 67 | ******************************************************************************************** |
64 | -3) DEV | |
68 | +# 3) DEV | |
69 | + | |
70 | +Pour lancer le même client seulement sur le "simulateur" de telescope (localhost, port 11110), ajouter "local" à la fin: | |
71 | + | |
72 | + $ cd devices_controller_concrete/device_controller_Gemini/ | |
73 | + $ ./client_telescope_controller_gemini_run.py local | |
65 | 74 | |
66 | -Pour lancer le client sur le "simulateur" de telescope (localhost, port 11110): | |
67 | -- dans un terminal, lancer le simulateur: ./server_run.py | |
68 | -- dans un autre terminal, lancer le client avec le paramètre "local": ./telescope_controller_gemini_run.py local | |
75 | +Dans un autre terminal, lancer le simulateur: | |
69 | 76 | |
77 | + $ ./server_telescope_gemini_simulator_run.py | |
70 | 78 | |
71 | 79 | |
72 | 80 | ******************************************************************************************** |
73 | -4) DONE | |
81 | +# 4) DONE | |
74 | 82 | |
75 | 83 | 5/10/18: |
76 | 84 | ... | ... |