-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugger.go
48 lines (40 loc) · 926 Bytes
/
plugger.go
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
// Package plugger provides data structures and utilities for manipulating DMR
// codeplugs. At the moment, effort is focused on the MD-380 family of radios
// which have a (simple enough) binary file format. The types defined in this
// package provide high-level abstractions of the data structures used in the
// radio whilst the format package provides platform-specific data structures.
package plugger
type Plug struct {
Contacts []Contact
RxGroups []RxGroup
Zones []Zone
ScanLists []ScanList
}
func (p *Plug) Reset() {
p.Contacts = nil
p.RxGroups = nil
p.Zones = nil
p.ScanLists = nil
}
type Contact struct {
Name string
ID uint32
}
type ContactList struct {
Name string
Contacts []*Contact
}
type RxGroup struct {
Name string
Contacts []uint16
}
type Zone struct {
Name string
Contacts []*Contact
}
type ScanList struct {
ContactList
}
type Channel struct {
ContactList
}