README.md
1
2![Logo](docs/images/ioflo_logo.png?raw=true)
3
4#Ioflo
5
6##Enabling The Programmable World
7
8http://ioflo.com
9
10## Getting Started
11
12### Installation
13
14``` bash
15
16$ pip install ioflo
17
18
19```
20
21on OS X
22
23``` bash
24$ sudo pip install ioflo
25
26```
27
28### Command Line
29
30``` bash
31$ ioflo -h
32```
33```text
34
35usage: ioflo [-h] [-V] [-v VERBOSE] [-c CONSOLE] [-p PERIOD] [-r] [-R]
36 [-n NAME] -f FILENAME [-b [BEHAVIORS [BEHAVIORS ...]]]
37 [-m PARSEMODE] [-U USERNAME] [-P PASSWORD] [-S [STATISTICS]]
38
39Runs ioflo. Example: ioflo -f filename -p period -v level -r -h -b
40'mybehaviors.py'
41
42optional arguments:
43 -h, --help show this help message and exit
44 -V, --version Prints out version of ioflo.
45 -v VERBOSE, --verbose VERBOSE
46 Verbosity level.
47 -c CONSOLE, --console CONSOLE
48 File path name to console log file.
49 -p PERIOD, --period PERIOD
50 Period per skedder run in seconds.
51 -r, --realtime Run skedder at realtime.
52 -R, --retrograde Shift skedder timers when retrograde clock detected.
53 -n NAME, --name NAME Skedder name.
54 -f FILENAME, --filename FILENAME
55 File path to FloScript file.
56 -b [BEHAVIORS [BEHAVIORS ...]], --behaviors [BEHAVIORS [BEHAVIORS ...]]
57 Module name strings to external behavior packages.
58 -m PARSEMODE, --parsemode PARSEMODE
59 FloScript parsing mode.
60 -U USERNAME, --username USERNAME
61 Username.
62 -P PASSWORD, --password PASSWORD
63 Password.
64 -S [STATISTICS], --statistics [STATISTICS]
65 Profile and compute performance statistics. Put
66 statistics into file path given by optional argument.
67 Default statistics file path is
68 /tmp/ioflo/profile/NAME.
69
70```
71
72Example:
73
74Put the following into the file box1.flo
75
76``` text
77
78#example mission box1.flo
79
80house box1
81
82 framer vehiclesim be active first vehicle_run
83 frame vehicle_run
84 do simulator motion uuv
85
86 framer mission be active first northleg
87 frame northleg
88 set elapsed with 20.0
89 set heading with 0.0
90 set depth with 5.0
91 set speed with 2.5
92 go next if elapsed >= goal
93
94 frame eastleg
95 set heading with 90.0
96 go next if elapsed >= goal
97
98 frame southleg
99 set heading with 180.0
100 go next if elapsed >= goal
101
102 frame westleg
103 set heading with 270.0
104 go next if elapsed >= goal
105
106 frame mission_stop
107 bid stop vehiclesim
108 bid stop autopilot
109 bid stop me
110
111 framer autopilot be active first autopilot_run
112 frame autopilot_run
113 do controller pid speed
114 do controller pid heading
115 do controller pid depth
116 do controller pid pitch
117
118```
119
120To run
121
122```bash
123$ ioflo -v terse -f box1.flo
124
125```
126
127Something like this should print on the console.
128
129```bash
130----------------------
131Building ...
132Building Houses for Skedder Skedder ...
133 Created house box1. Assigning registries, creating instances ...
134 Built house box1 with meta:
135 plan: Share {'value': 'Test'}
136 version: Share {'value': '0.7.2'}
137 platform: Share {'os': 'unix', 'processor': 'intel'}
138 period: Share {'value': 0.125}
139 real: Share {'value': False}
140 filepath: Share {'value': 'box1.flo'}
141 mode: Share {'value': []}
142 behaviors: Share {'value': []}
143 credentials: Share {'username': '', 'password': ''}
144 name: Share {'value': 'box1'}
145 Warning: Nonexistent goal share goal.heading ... creating anyway
146 Warning: Transfer into non-existent field 'value' in share goal.heading ... creating anyway
147 Warning: Nonexistent goal share goal.depth ... creating anyway
148 Warning: Transfer into non-existent field 'value' in share goal.depth ... creating anyway
149 Warning: Nonexistent goal share goal.speed ... creating anyway
150 Warning: Transfer into non-existent field 'value' in share goal.speed ... creating anyway
151 Ordering taskable taskers for house box1
152 Resolving house box1
153 Resolving framer vehiclesim
154 Resolving framer mission
155 Resolving framer autopilot
156 Tracing outlines for house box1
157 Tracing outlines for framer vehiclesim
158 Tracing outlines for framer mission
159 Tracing outlines for framer autopilot
160
161
162Starting mission from file box1.flo...
163 Starting Framer vehiclesim ...
164To: vehiclesim<<vehicle_run> at 0.0
165 Starting Framer mission ...
166To: mission<<northleg> at 0.0
167 Starting Framer autopilot ...
168To: autopilot<<autopilot_run> at 0.0
169To: mission<<eastleg> at 20.0 Via: northleg (go next if elapsed >= goal) From: <northleg> after 20.000
170To: mission<<southleg> at 40.0 Via: eastleg (go next if elapsed >= goal) From: <eastleg> after 20.000
171To: mission<<westleg> at 60.0 Via: southleg (go next if elapsed >= goal) From: <southleg> after 20.000
172To: mission<<mission_stop> at 80.0 Via: westleg (go next if elapsed >= goal) From: <westleg> after 20.000
173 Stopping autopilot in autopilot_run at 80.000
174 Stopping vehiclesim in vehicle_run at 80.125
175 Stopping mission in mission_stop at 80.125
176No running or started taskers. Shutting down skedder ...
177Total elapsed real time = 0.2099
178Aborting all ready taskers ...
179 Aborting vehiclesim at 80.125
180 Tasker 'vehiclesim' aborted
181 Aborting mission at 80.125
182 Tasker 'mission' aborted
183 Aborting autopilot at 80.125
184 Tasker 'autopilot' aborted
185
186----------------------
187
188
189```
190
191### Documentation
192
193github
194
195https://github.com/ioflo/ioflo_manuals
196
197#### License
198APACHE 2.0
199
200#### Supported Python Versions
201
202Python 3.7.4 +
203
204