Open schwehr opened 8 years ago
gsf-dump-hex history-empty.gsf c++ setup: #include <array> using std::array; record: 0 HEADER header: 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x01 data: 0x47, 0x53, 0x46, 0x2D, 0x76, 0x30, 0x33, 0x2E, 0x30, 0x36, 0x00, 0x00 c++ data: // Record type: HEADER const uint32_t size_0 = 12; array<uint8_t, size_0> data_0 = {{ 0x47, 0x53, 0x46, 0x2D, 0x76, 0x30, 0x33, 0x2E, 0x30, 0x36, 0x00, 0x00, }}; Traceback (most recent call last): File "/Users/schwehr/src/generic-sensor-format/ve/bin/gsf-dump-hex", line 9, in <module> load_entry_point('gsf==0.1', 'console_scripts', 'gsf-dump-hex')() File "/Users/schwehr/src/generic-sensor-format/gsf/dump_hex.py", line 73, in main DumpHex(filename) File "/Users/schwehr/src/generic-sensor-format/gsf/dump_hex.py", line 40, in DumpHex for record_num, record in enumerate(gsf_file): File "/Users/schwehr/src/generic-sensor-format/gsf/__init__.py", line 184, in __next__ record.update(GsfHistory(data)) File "/Users/schwehr/src/generic-sensor-format/gsf/__init__.py", line 102, in GsfHistory operator_size = struct.unpack('>I', data[base:base+4])[0] struct.error: unpack requires a string argument of length 4