Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ML
lib
Binary Storage
Commits
4318494e
Commit
4318494e
authored
Feb 25, 2020
by
Zhukov, Alexander P
Browse files
WIP
parent
8a095870
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/read_seq.py
View file @
4318494e
...
...
@@ -8,9 +8,9 @@ Created on Mon Jan 27 16:11:06 2020
from
read_storage
import
BinaryStorage
#
file = BinaryStorage('/data/BinStorage/BCMData/200210_1512_00110000_DCM.bin')
#
file = BinaryStorage('/data/BinStorage/BCMData/200210_1538_00110000_DCM.bin')
file
=
BinaryStorage
(
'/data/BinStorage/test.bin'
)
file
=
BinaryStorage
(
'/data/BinStorage/BCMData/
Convert/
200210_1512_00110000_DCM.bin'
)
#file = BinaryStorage('/data/BinStorage/BCMData/
Convert/
200210_1538_00110000_DCM.bin')
#
file = BinaryStorage('/data/BinStorage/test.bin')
def
show
(
record
):
if
'value'
in
record
:
...
...
@@ -26,6 +26,6 @@ while True:
show
(
record
)
print
(
'++++++++++++++++'
)
show
(
file
[
9
])
show
(
file
[
10
])
file
.
close
()
py/read_storage.py
View file @
4318494e
...
...
@@ -184,7 +184,7 @@ def read_record(file):
while
True
:
field_type
=
read_byte
(
file
)
print
(
'Field type'
,
field_type
,
hex
(
field_type
))
#
print('Field type', field_type, hex(field_type))
func
=
parser
.
get
(
field_type
,
lambda
file
,
rec
:
True
)
result
=
func
(
file
,
record
)
if
not
result
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment