Uwar tools

From University of Washington - Ubicomp Research Page
Revision as of 23:30, 11 October 2006 by Jonathan Lester (talk | contribs)
Jump to navigationJump to search

Overview

This document lists the various tools for working with uwar files and related data. An example .uwar file is hosted on this machine that you can use to test with. All outputs on this page are from this file: example.uwar.

central

central is the server for the IPC (Inter Process Communications) package developed by Reid Simmons. IPC provides a simple means of communicating between applications on the same computer and other machines via TCP/IP. Central is used by the msb-server and several other applications to share information. More information about IPC can be found at the projects homepage.

usage

    Typical Usage

      Spawn central and send it to the background
      central -u &
      

    Available Commands

      Various debugging/logging capabilities are also available if necessary. Remember to have a process cat the .log file that central creates.
      The following are central commands:
       help: print this message
       display: display the active and pending messages
       status: display the known modules and their status
       memory: display total memory usage
       close <module>: close a connection to a module
       unlock <resource>: unlock a locked resource
      
      The following command line options can also be used as commands:
      -v: display server version information
      -l<option>: logging onto terminal. Options are:
         m (message traffic)
         s (status of IPC)
         t (time messages are received by central)
         d (data associated with messages)
         i (ignore logging certain internal messages)
         h (handle time summary of incoming messages)
         r (log the reference ID as well as the message name)
         p (log the reference ID of the message’s parent)
         x (no logging)
      
      -l (no options) is equivalent to -lmstdh; the default is –lmsi
      
      -L<option>: logging into file.
        Options are the same as above, with the addition of
         F (don’t flush file after each line)
         n (don’t prompt user for comments)
        The default is –Lx
      
      -f<filename>: filename to use for logging; If not specified, name is automatically generated.
      
      -p<port>: connect to central server on this port number.
      -c: Use direct (not via central) connections when possible
      -I<msgName>: Ignore logging this message (can occur multiple times).
      -I<filename>: File with names of messages to ignore logging
      -s: silent running; don’t print anything to terminal.
      -u: don’t run the user (tty) interface.
      -r: try resending non-completed messages when modules crash and then reconnect.
      


uwar_cat

uwar_cat is a program to extract data from uwar files and dump them in a human readable format. The output format is something of the form:

SENSORA      TIMESTAMP DATA ...
SENSORB      TIMESTAMP DATA ...
SENSORC      TIMESTAMP DATA ...

If you want to retrieve data from a specific sensor you can use the grep command.
Windows users: You can download a win32 version of grep from the gnuwin32 webpage. You will also need to grab some additional libraries or you can try this zipped version which should contain all the necessary libraries. Simply extract the zip to your Windows\system32 directory.

usage

    uwar_cat <filename>
    

example output

    uwar_cat example.uwar
    # INFO: open file example.uwar
    # INFO: read UWAR v2 header
    # INFO: read UWAR v2 data
    ACCEL        1160595736.915 -0.028381 0.013855 0.980713
    ACCEL        1160595736.915 -0.027588 0.013733 0.981079
    AMB-LIGHT    1160595736.915 16 9.602142
    DALS         1160595736.915 671.500000 73.500000 219.288132
    ACCEL        1160595736.915 -0.027222 0.014099 0.980042
    ACCEL        1160595736.915 -0.027039 0.013428 0.981628
    AMB-LIGHT    1160595736.915 16 9.661065
    ACCEL        1160595736.915 -0.027893 0.014221 0.981079
    ACCEL        1160595736.915 -0.027100 0.013916 0.981812
    ...
    


uwar-info

uwar_info will display the meta data stored in the uwar file. This information can be useful in determining what streams are inside a uwar file and what settings might be in use, for example you can retrieve the schedule and the calibration data from the sensor boards with this command.

usage

    uwar_info <filename>
    

example output

    uwar-info example.uwar 
    # INFO: open file example.uwar
    # INFO: read UWAR v2 header
    # INFO: all meta  0: id=(726e6462:bdnr) type='i' = 11
    # INFO: all meta  1: id=(72657668:hver) type='i' = 2
    # INFO: all meta  2: id=(616d7773:swma) type='i' = 1
    # INFO: all meta  3: id=(696d7773:swmi) type='i' = 1
    # INFO: all meta  4: id=(31306477:wd01) type='i' = 48224
    # INFO: all meta  5: id=(32306477:wd02) type='i' = 47962
    # INFO: all meta  6: id=(33306477:wd03) type='i' = 28705
    # INFO: all meta  7: id=(34306477:wd04) type='i' = 44956
    # INFO: all meta  8: id=(72746e69:intr) type='i' = 5120
    # INFO: all meta  9: id=(2063696d:mic ) type='i' = 8192
    # INFO: all meta 10: id=(20636361:acc ) type='i' = 5120
    # INFO: all meta 11: id=(20626d61:amb ) type='i' = 2560
    # INFO: all meta 12: id=(20726162:bar ) type='i' = 71
    # INFO: all meta 13: id=(706d6f63:comp) type='i' = 0
    # INFO: all meta 14: id=(736c6164:dals) type='i' = 30
    # INFO: all meta 15: id=(206d7568:hum ) type='i' = 10
    # INFO: all meta 16: id=(72776f70:powr) type='i' = 0
    # INFO: stream 0: id=0 (2063696d:mic ) -> ref(0)
    # INFO: stream 1: id=1 (3262736d:msb2) -> ref(1)
    # INFO: stream 2: id=2 (20676174:tag ) -> ref(2)
    # INFO: stream 3: id=3 (6b636c63:clck) -> ref(3)
    # INFO: stream 4: id=4 (20737067:gps ) -> ref(4)
    # INFO: read UWAR data
    # INFO: ---- calibration ----
    # INFO: board nr            = b (11)
    # INFO: hardware version nr = 2
    # INFO: major soft version  = 1
    # INFO: minor soft version  = 1
    # INFO: calibration word 1  = 48224
    # INFO: calibration word 2  = 47962
    # INFO: calibration word 3  = 28705
    # INFO: calibration word 4  = 44956
    # INFO: calibration val c1  = 24112
    # INFO: calibration val c2  = 2140
    # INFO: calibration val c3  = 702
    # INFO: calibration val c4  = 448
    # INFO: calibration val c5  = 749
    # INFO: calibration val c6  = 26
    # INFO: ------ schedule -----
    # INFO: interrupt count     = 5120
    # INFO: mic hz              = 8192
    # INFO: accelerometer hz    = 512.0
    # INFO: amb light hz        = 256.0
    # INFO: barometer hz        = 7.1
    # INFO: compass hz          = 0.0
    # INFO: dals hz             = 3.0
    # INFO: humidity hz         = 1.0
    # INFO: power               = 0
    # INFO: read UWAR v2 data
    # INFO: read 53899 packets           
    
    # INFO: time from:   11.09.2006 12:42:16.914999
    # INFO: time to:     11.09.2006 12:43:09.532000
    
    INFO: statistics packets
           26953   msb2 (missed 0 packets (0.0000%))
           26946   mic  (missed 6 packets (0.0223%))
           53899   total
    


uwar_msb_dump

uwar_msb_dump is a program to dump the raw serial packets stored inside the uwar file to a single binary output file. This is useful for debugging problems with the MSB itself and analyzing the packets received by the msb-server.

usage

    uwar_msb_dump <input_uwar_filename> <output_binary_file>
    

example output

    uwar_msb_dump example.uwar example.bin
    # INFO: open file example.uwar
    # INFO: Output file example.bin
    # INFO: read UWAR v2 header
    # INFO: read UWAR v2 data