aboutsummaryrefslogtreecommitdiff
path: root/csta
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-09 20:00:06 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-09 20:00:06 +0200
commit436a39bb1ea3402c381827d0bc470c01cda0d2cf (patch)
tree25feacca3f7dc734da8064689931a83a22056285 /csta
parent3479b3dbacceeb2fdc7591bdb150c10e31299ba4 (diff)
Readable status
Diffstat (limited to 'csta')
-rw-r--r--csta/system-status.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/csta/system-status.go b/csta/system-status.go
index 9e0ea22..7afe858 100644
--- a/csta/system-status.go
+++ b/csta/system-status.go
@@ -23,3 +23,29 @@ type SystemStatusArg struct {
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 ""
+}