-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsonCodeplugDesc.go
More file actions
110 lines (96 loc) · 3.17 KB
/
jsonCodeplugDesc.go
File metadata and controls
110 lines (96 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Copyright 2017-2018 Dale Farnsworth. All rights reserved.
// Dale Farnsworth
// 1007 W Mendoza Ave
// Mesa, AZ 85210
// USA
//
// dale@farnsworth.org
// This file is part of GenCodeplugInfo.
//
// GenCodeplugInfo is free software: you can redistribute it and/or modify
// it under the terms of version 3 of the GNU General Public License
// as published by the Free Software Foundation.
//
// GenCodeplugInfo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GenCodeplugInfo. If not, see <http://www.gnu.org/licenses/>.
package main
type top struct {
Codeplugs []*Codeplug `json:"codeplugs"`
Records []*Record `json:"records"`
Fields []*Field `json:"fields"`
}
type Codeplug struct {
Models []string `json:"models"`
Type string `json:"type"`
Ext string `json:"ext"`
RdtSize int `json:"rdtSize"`
HeaderSize int `json:"headerSize"`
TrailerOffset int `json:"trailerOffset"`
TrailerSize int `json:"trailerSize"`
RecordTypes []string `json:"recordTypes"`
}
type Record struct {
TypeName string `json:"typeName"`
Type string `json:"type"`
Offset int `json:"offset"`
Size int `json:"size"`
Max int `json:"max"`
DelDesc *DelDesc `json:"delDesc"`
FieldTypes []string `json:"fieldTypes"`
NamePrefix string `json:"namePrefix"`
Names []string `json:"names"`
}
type DelDesc struct {
Offset int `json:"offset"`
Size int `json:"size"`
Value int `json:"value"`
}
type Field struct {
TypeName string `json:"typeName"`
Type string `json:"type"`
BitOffset int `json:"bitOffset"`
BitSize int `json:"bitSize"`
Max int `json:"max"`
ValueType string `json:"valueType"`
DefaultValue string `json:"defaultValue"`
Strings *Strings `json:"strings"`
Span *Span `json:"span"`
IndexedStrings *IndexedStrings `json:"indexedStrings"`
ExtOffset int `json:"extOffset"`
ExtSize int `json:"extSize"`
ExtIndex int `json:"extIndex"`
ExtBitOffset int `json:"extBitOffset"`
ListType *string `json:"listType"`
EnablesIn []*EnableIn `json:"enables"`
EnableIn *EnableIn `json:"enable"`
EnablerType string
Enablers []Enabler
Enables []string
}
type Strings []string
type IndexedString struct {
Index int `json:"index"`
String string `json:"string"`
}
type IndexedStrings []IndexedString
type Span struct {
Min int `json:"min"`
Max int `json:"max"`
Scale int `json:"scale"`
Interval int `json:"interval"`
MinString string `json:"minString"`
}
type EnableIn struct {
Value string `json:"value"`
Enables []string `json:"enables"`
Disables []string `json:"disables"`
}
type Enabler struct {
Value string
Enable bool
}