UKY-CS-499-Project14-Spring17 / htpewpew

Portable drivers for connecting to an HTPOW Engraver (your mileage may vary for similar engravers)
GNU General Public License v3.0
2 stars 0 forks source link

Options for the parser.rb #1

Closed gps1784 closed 7 years ago

gps1784 commented 7 years ago

I want to have reverseEngineering/parser.rb use options. There are 6 fields as I see it:

1   Feb 20, 2017 15:18:02.486449000 EST host,3.9.0  0   
2   Feb 20, 2017 15:18:02.486628000 EST 3.9.0,host  18  
307 Feb 20, 2017 15:18:04.932095000 EST host,3.9.2  1   1b

count? date time sender size contents

The parser should always put the sender and (complete) packet, but selectively getting a timestamp might be nice.

I suggest:

ruby parser.rb -c -d -t file -o output

-c should get the first digit (whatever that digit means) -t should print the time of the beginning of the packet -d should print the date (implies -t) -o should change the output file location (for duplicating files, etc)

the system should also be louder about assuming file locations, etc. a help screen would be nice.

gps1784 commented 7 years ago

All of these parse options are now done.

Next: -x for hex to stream to the HTPOW device.

I may need to put some more time into understanding the HTPOW's process and serial ports in general to make this happen.

@lucianHymer We sorta understand how to stream bits, can we get this parser to work right with it? If we can get some kind of procedural serial comm, we'll be really close and have a cool demo.