-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcommand_string.go
More file actions
56 lines (51 loc) · 2.25 KB
/
command_string.go
File metadata and controls
56 lines (51 loc) · 2.25 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
// Code generated by "stringer -type Command"; DO NOT EDIT.
package dexcom
import "strconv"
const (
_Command_name_0 = "NullAckNakInvalidCommandInvalidParamIncompletePacketReceivedReceiverErrorInvalidMode"
_Command_name_1 = "PingReadFirmwareHeader"
_Command_name_2 = "ReadDatabasePartitionInfoReadDatabasePageRangeReadDatabasePagesReadDatabasePageHeader"
_Command_name_3 = "ReadTransmitterIDWriteTransmitterIDReadLanguageWriteLanguageReadDisplayTimeOffsetWriteDisplayTimeOffsetReadRTCResetReceiverReadBatteryLevelReadSystemTimeReadSystemTimeOffsetWriteSystemTimeReadGlucoseUnitsWriteGlucoseUnitsReadBlindModeWriteBlindModeReadClockModeWriteClockModeReadDeviceMode"
_Command_name_4 = "EraseDatabaseShutdownReceiverWriteSoftwareParametersReadBatteryStateReadHardwareID"
_Command_name_5 = "ReadFirmwareSettingsReadEnableSetupWizardFlag"
_Command_name_6 = "ReadSetupWizardState"
_Command_name_7 = "ReadChargerCurrentSettingWriteChargerCurrentSetting"
)
var (
_Command_index_0 = [...]uint8{0, 4, 7, 10, 24, 36, 60, 73, 84}
_Command_index_1 = [...]uint8{0, 4, 22}
_Command_index_2 = [...]uint8{0, 25, 46, 63, 85}
_Command_index_3 = [...]uint16{0, 17, 35, 47, 60, 81, 103, 110, 123, 139, 153, 173, 188, 204, 221, 234, 248, 261, 275, 289}
_Command_index_4 = [...]uint8{0, 13, 29, 52, 68, 82}
_Command_index_5 = [...]uint8{0, 20, 45}
_Command_index_6 = [...]uint8{0, 20}
_Command_index_7 = [...]uint8{0, 25, 51}
)
func (i Command) String() string {
switch {
case 0 <= i && i <= 7:
return _Command_name_0[_Command_index_0[i]:_Command_index_0[i+1]]
case 10 <= i && i <= 11:
i -= 10
return _Command_name_1[_Command_index_1[i]:_Command_index_1[i+1]]
case 15 <= i && i <= 18:
i -= 15
return _Command_name_2[_Command_index_2[i]:_Command_index_2[i+1]]
case 25 <= i && i <= 43:
i -= 25
return _Command_name_3[_Command_index_3[i]:_Command_index_3[i+1]]
case 45 <= i && i <= 49:
i -= 45
return _Command_name_4[_Command_index_4[i]:_Command_index_4[i+1]]
case 54 <= i && i <= 55:
i -= 54
return _Command_name_5[_Command_index_5[i]:_Command_index_5[i+1]]
case i == 57:
return _Command_name_6
case 59 <= i && i <= 60:
i -= 59
return _Command_name_7[_Command_index_7[i]:_Command_index_7[i+1]]
default:
return "Command(" + strconv.FormatInt(int64(i), 10) + ")"
}
}