Commit cd15a4ca authored by Zhukov, Alexander P's avatar Zhukov, Alexander P
Browse files

Implemented four data types: byte, int32, double, float

parent fcbbe689
......@@ -65,6 +65,15 @@
</Item>
</Item>
<Item Name="Polymorphic" Type="Folder">
<Item Name="WriteDBL.vi" Type="VI" URL="../WriteDBL.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;"!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!#A!&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!A!#1-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!!+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!+!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1342710288</Property>
</Item>
<Item Name="WriteDescr.vi" Type="VI" URL="../WriteDescr.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%S!!!!#A!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!Z!-0````]&amp;2'6T9X)!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!1!"A!%!!=!#!-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!!!!!!!#A!!!!!!!!%+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!*!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
......@@ -92,6 +101,24 @@
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1082143248</Property>
</Item>
<Item Name="WriteIDBLArr.vi" Type="VI" URL="../WriteIDBLArr.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;4!!!!$!!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!#A!&amp;6G&amp;M&gt;75!%E"!!!(`````!!A&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!E!#A-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!%+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!,!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1074274834</Property>
</Item>
<Item Name="WriteISGLArr.vi" Type="VI" URL="../WriteISGLArr.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;4!!!!$!!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!#1!&amp;6G&amp;M&gt;75!%E"!!!(`````!!A&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!E!#A-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!%+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!,!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1074278928</Property>
</Item>
<Item Name="WriteName.vi" Type="VI" URL="../WriteName.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%S!!!!#A!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!Z!-0````]%4G&amp;N:1!!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!1!"A!%!!=!#!-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!!!!!!!#A!!!!!!!!%+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!*!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
......@@ -101,6 +128,15 @@
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1082143250</Property>
</Item>
<Item Name="WriteSGL.vi" Type="VI" URL="../WriteSGL.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;"!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!#1!&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!A!#1-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!!+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!+!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1342710288</Property>
</Item>
<Item Name="WriteTag.vi" Type="VI" URL="../WriteTag.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%Q!!!!#A!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!R!-0````]$6'&amp;H!#R!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$5*J&lt;F.U&lt;X*B:W5A;7Y!91$Q!!Q!!Q!%!!1!"1!%!!1!"!!%!!9!"!!(!!A$!!"Y!!!.#!!!!!!!!!!!!!!.#Q!!!!!!!!!!!!!!!!!!!!!!!!I!!!!!!!!"#A!!!")!!!U!!!!-!!!!!!!!!!!!!!%!#1!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
......@@ -119,6 +155,24 @@
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1082143234</Property>
</Item>
<Item Name="WriteU8.vi" Type="VI" URL="../WriteU8.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;"!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!"1!&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!A!#1-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!!+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!+!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1342710288</Property>
</Item>
<Item Name="WriteU8Arr.vi" Type="VI" URL="../WriteU8Arr.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!&amp;4!!!!$!!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#Z!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$E*J&lt;F.U&lt;X*B:W5A&lt;X6U!!!31$$`````#6"B=G&amp;N:82F=A!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!!N!"1!&amp;6G&amp;M&gt;75!%E"!!!(`````!!A&amp;6G&amp;M&gt;75!,%"Q!"Y!!"131GFO5X2P=G&amp;H:3ZM&gt;G.M98.T!!!.1GFO5X2P=G&amp;H:3"J&lt;A"B!0!!$!!$!!1!"!!&amp;!!1!"!!%!!9!"Q!%!!E!#A-!!(A!!!U)!!!!!!!!!!!!!!U,!!!!!!!!!!!!!!!!!!%+!!!!#!!!!!!!!!%+!!!!%A!!$1!!!!Q!!!!!!!!!!!!!!1!,!!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1342710288</Property>
</Item>
</Item>
<Item Name="Close.vi" Type="VI" URL="../Close.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%;!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!!V!#!!'9X6S=W^S!!!71%!!!@````]!"1BD&lt;WZU:7ZU=Q!!$E!S`````Q2Q982I!!!A1&amp;!!!Q!!!!%!!B.F=H*P=C"J&lt;C!I&lt;G]A:8*S&lt;X)J!#R!=!!?!!!5%E*J&lt;F.U&lt;X*B:W5O&lt;(:D&lt;'&amp;T=Q!!$5*J&lt;F.U&lt;X*B:W5A;7Y!6!$Q!!Q!!Q!%!!9!"Q!%!!1!"!!%!!A!"!!%!!E$!!"Y!!!*!!!!!!!!!!E!!!!*!!!!!!!!!!!!!!!!!!!!!!!!!!I!!!!!!!!!!!!!!*)!!!!!!1!+!!!!!!</Property>
......
No preview for this file type
No preview for this file type
No preview for this file type
File added
No preview for this file type
No preview for this file type
File added
File added
......@@ -30,8 +30,9 @@ def short_str(file):
def name(file, rec):
length = read_size(file, False)
raw = file.read(length)
description = raw.decode()
rec['name'] = description
# print(raw)
name = raw.decode()
rec['name'] = name
return True
......@@ -45,9 +46,16 @@ def tst(file,rec):
def param_value(param=False,wf=False, vtype='I'):
type_size = {
'I': 4,
'B': 1,
'd': 8,
'f': 4
}
def read(file, rec):
if param:
key = short_str(file)
# print('key', key)
else:
key = 'value'
if wf:
......@@ -57,7 +65,7 @@ def param_value(param=False,wf=False, vtype='I'):
ar.byteswap()
value = ar
else:
raw = file.read(4)
raw = file.read(type_size[vtype])
ar = array(vtype,raw)
ar.byteswap()
value = ar[0]
......@@ -98,10 +106,27 @@ parser = {
4: tag,
1: name,
2: tst,
6: param_value(param=True,wf=False,vtype='I'),
16: param_value(param=False,wf=False,vtype='I'),
36: param_value(param=False,wf=True,vtype='I'),
26: param_value(param=True,wf=True,vtype='I'),
7: param_value(param=True,wf=False,vtype='d'),
17: param_value(param=False,wf=False,vtype='d'),
37: param_value(param=False,wf=True,vtype='d'),
27: param_value(param=True,wf=True,vtype='d'),
8: param_value(param=True,wf=False,vtype='B'),
18: param_value(param=False,wf=False,vtype='B'),
38: param_value(param=False,wf=True,vtype='B'),
28: param_value(param=True,wf=True,vtype='B'),
9: param_value(param=True,wf=False,vtype='f'),
19: param_value(param=False,wf=False,vtype='f'),
39: param_value(param=False,wf=True,vtype='f'),
29: param_value(param=True,wf=True,vtype='f'),
254: end_record,
255: end_file
}
......@@ -115,7 +140,7 @@ def read_record(file):
while True:
field_type = read_byte(file)
# print('Field type', 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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment