viewtopic.php?f=8&t=1486
I want a new app! Who wants to write it?
Purpose
- Get Cutecom out of the picture, it's clunky to use.
- Get meta data into the log file by default to improve the self descriptive qualities
- Make binary logging a single command operation and not a gui marathon
- Remove variables from logging by defaulting to standard FreeEMS comms properties
Options:
- Adjustable serial device via option.
- Adjustable log stream type via option.
- Configure serial port
- Open serial port
- Send stop logging packet
- Start recording to .bin file
- Request meta data packets and dump each to console
- Send start logging packet
- Die when killed or asked to die
- Maintain a minimal buffer so as to lose minimal data when killed. Write per packet received would likely work well. No point in doing it more often.
Code: Select all
################################################################################
###################### Initiating Interrogation Sequence!! #####################
################################################################################
Interface Version: IFreeEMS Vanilla 0.0.0
Firmware Version: 0.2.0-SNAPSHOT-94-gd1b8c27-DEV
Decoder Name: EvenTeeth-Both-12and1
Build Date: Sun Feb 26 21:05:56 CET 2012
Compiler Version: 3.3.6-m68hc1x-20060122
Build OS Type: Linux
Maximum Size: 2064
Echo length: 10
################################################################################
################### Interrogation Sequence Completed in 65ms! ##################
################################################################################
Standard Usage
binflogger
Should get you a log dumping to FreeEMS.log.yyyy-MM-DD.HH-mm-ss.bin (or similar)
binflogger filename.bin
Should get you a log dumping into that file name from /dev/ttyUSB0
binflogger -d /dev/ttyUSB1 filename.bin
Should get you the same from the second usb serial device.
binflogger -d /dev/ttyUSB1
Should get you the standard dated log name from that device.
The rest can be tweaked in source for now, including the default stream type, though an option would be easy to add.
Bonus Points For
- No args usage with intelligent file naming including firmware hash, decoder type, log type and current time/date stamp etc
- parity none/odd/even override that outputs a "You've changed the parity, this won't work without custom firmware" warning.
- baud rate override the same warning style
- ~/.* config file to spec the standard log directory and default file name format with a pattern
- To save the the interrogation data to a matching file name with .meta or .info suffix as well as dumping it to the console
- Having a nice way to stop logging and/or doing it in a thread and interrogating the user for context about the log in a format similar to Sim's file
- Having a defaults for each mostly static entry in the config file so that enter takes you through most of it quickly
1:
dumb send of packets with sleeps in between
dumb record of data to file
hard coded everything
required single argument of file name
2:
add options to control various things
add date file name default stuff
3:
Be smart about receiving packets using time outs on serial read calls for the first section and then just dumping per byte there after
Output of meta data to console while reading it from device
4:
Stuff from bonus points section
Dev Suggestions
Use lacerated pempheridae code as a basis
Use my parser source from firmware/bin/ as a basis
So, who's going to be the man? Or woman?
Fred.