-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpackets.go
63 lines (50 loc) · 862 Bytes
/
packets.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package gogsmmodem
import "time"
type Packet interface{}
// +ZPASR
type ServiceStatus struct {
Status string
}
// +ZDONR
type NetworkStatus struct {
Network string
}
// +CMTI
type MessageNotification struct {
Storage string
Index int
}
// +CSCA
type SMSCAddress struct {
Args []interface{}
}
// +CMGR
type Message struct {
Index int
Status string
Telephone string
Timestamp time.Time
Body string
Last bool
}
// +CPMS=?
type StorageAreas struct {
Received []string
Sent []string
New []string
}
// +CPMS=...
type StorageInfo struct {
UsedSpace1, MaxSpace1, UsedSpace2, MaxSpace2, UsedSpace3, MaxSpace3 int
}
// +CMGL
type MessageList []Message
// Simple OK response
type OK struct{}
// Simple ERROR response
type ERROR struct{}
// Unknown
type UnknownPacket struct {
Command string
Args []interface{}
}