aboutsummaryrefslogtreecommitdiff
path: root/csta/system-status.go
blob: 7afe858fc4dfd0fa2ce006afc61f0cf499b5eefb (plain)
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
package csta

import "github.com/dim13/asn1"

const SystemStatusOpcode = 211

const (
	SystemStatusInitializing asn1.Enumerated = iota
	SystemStatusEnabled
	SystemStatusNormal
	SystemStatusMessagesLost
	SystemStatusDisabled
	SystemStatusOverloadImminent
	SystemStatusOverloadReached
	SystemStatusOverloadRelieved
	SystemStatusPartiallyDisabled
)

type SystemStatusArg struct {
	SystemStatus asn1.Enumerated
}

type SystemStatusRes struct {
	asn1.Null
}

type SystemStatus asn1.Enumerated

func (s SystemStatus) String() string {
	switch asn1.Enumerated(s) {
	case SystemStatusInitializing:
		return "Initializing"
	case SystemStatusEnabled:
		return "Enabled"
	case SystemStatusNormal:
		return "Normal"
	case SystemStatusMessagesLost:
		return "Message Lost"
	case SystemStatusDisabled:
		return "Disabled"
	case SystemStatusOverloadImminent:
		return "Overload Imminent"
	case SystemStatusOverloadReached:
		return "Overload Reached"
	case SystemStatusOverloadRelieved:
		return "Overload Relieved"
	case SystemStatusPartiallyDisabled:
		return "Partially Disabled"
	}
	return ""
}