Running processes with proccontrol: Difference between revisions
Ryan Libby (talk | contribs) No edit summary |
Ryan Libby (talk | contribs) (move first two sentences to the Creating an MSP SD image article) |
||
Line 1: | Line 1: | ||
On the MSP ([[Sensor_Boards#MSB_Version_2|MSB]] stacked on [[IMote2]]), an init script (<tt>/etc/init.d/S80msp</tt>) invokes <tt>/mnt/mmc/msp/central.loop</tt> and <tt>/mnt/mmc/msp/proccontrol.loop</tt>. The latter, together with <tt>/mnt/mmc/msp/process.ini</tt> is the hook for automatically running sensor-data-processing-related software. | |||
<tt>process.ini</tt> describes which commands should be run automatically. Programs that crash or otherwise terminate will be restarted, ad infinitum. | <tt>process.ini</tt> describes which commands should be run automatically. Programs that crash or otherwise terminate will be restarted, ad infinitum. |
Latest revision as of 19:00, 23 July 2008
On the MSP (MSB stacked on IMote2), an init script (/etc/init.d/S80msp) invokes /mnt/mmc/msp/central.loop and /mnt/mmc/msp/proccontrol.loop. The latter, together with /mnt/mmc/msp/process.ini is the hook for automatically running sensor-data-processing-related software.
process.ini describes which commands should be run automatically. Programs that crash or otherwise terminate will be restarted, ad infinitum.
process.ini format and example
The following is a typical process.ini. Note that there is a symlink from /msp to /mnt/mmc/msp.
# module_name group_name requested_state watch_heartbeats command_line msb-server msb 1 0 /msp/msb-server -ini /msp/msb.ini lsb-server lsb 1 0 /msp/lsb-server -ini /msp/lsb.ini bt-listener bt 1 0 /msp/bt-listener -channel 2 bt-commander bt 1 0 /msp/bt-commander #logger msb 1 0 /msp/logger -ini /msp/logger.ini servo-server lsb 1 0 /msp/servo-server -ini /msp/servo.ini gps-server lsb 1 0 /msp/gps-server #imu imu 1 0 /msp/imu -ini /msp/imu.ini inference ai 1 0 /msp/inference -xml /msp/peak_detection.xml -bt2 60
Fields are whitespace-delimited. Lines are delimited by the line feed character ('\n', ASCII 0x0a). '#' starts a comment.
command_line is the critical piece. Unless you're actually using the remote proccontrol features, just make something up for the names and leave requested_state at 1 (running) and watch_heartbeats at 0 (no).
The minimum set of processes for step detection is msb-server, inference, and bt-listener.