-
Notifications
You must be signed in to change notification settings - Fork 0
/
messageidentifier.go
283 lines (277 loc) · 19.1 KB
/
messageidentifier.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
package xsens
// MessageIdentifier identifies the type of an Xsens message.
type MessageIdentifier uint8
//go:generate stringer -type MessageIdentifier -trimprefix MessageIdentifier
// Ack returns the message identifier's corresponding ack.
func (mid MessageIdentifier) Ack() MessageIdentifier {
return mid + 1
}
// IsAck returns true if the message identifier is an ack.
func (mid MessageIdentifier) IsAck() bool {
return mid%2 == 1
}
const (
MessageIdentifierWakeup MessageIdentifier = 0x3E
MessageIdentifierWakeupAck MessageIdentifier = 0x3F
MessageIdentifierReqDID MessageIdentifier = 0x00
MessageIdentifierDeviceID MessageIdentifier = 0x01
MessageIdentifierInitBus MessageIdentifier = 0x02
MessageIdentifierInitBusResults MessageIdentifier = 0x03
MessageIdentifierReqPeriod MessageIdentifier = 0x04
MessageIdentifierReqPeriodAck MessageIdentifier = 0x05
MessageIdentifierSetPeriod MessageIdentifier = 0x04
MessageIdentifierSetPeriodAck MessageIdentifier = 0x05
MessageIdentifierSetBid MessageIdentifier = 0x06
MessageIdentifierSetBidAck MessageIdentifier = 0x07
MessageIdentifierAutoStart MessageIdentifier = 0x06
MessageIdentifierAutoStartAck MessageIdentifier = 0x07
MessageIdentifierBusPower MessageIdentifier = 0x08
MessageIdentifierBusPowerAck MessageIdentifier = 0x09
MessageIdentifierReqDataLength MessageIdentifier = 0x0A
MessageIdentifierDataLength MessageIdentifier = 0x0B
MessageIdentifierReqConfiguration MessageIdentifier = 0x0C
MessageIdentifierConfiguration MessageIdentifier = 0x0D
MessageIdentifierRestoreFactoryDef MessageIdentifier = 0x0E
MessageIdentifierRestoreFactoryDefAck MessageIdentifier = 0x0F
MessageIdentifierGotoMeasurement MessageIdentifier = 0x10
MessageIdentifierGotoMeasurementAck MessageIdentifier = 0x11
MessageIdentifierReqFirmwareRevision MessageIdentifier = 0x12
MessageIdentifierFirmwareRevision MessageIdentifier = 0x13
MessageIdentifierReqBluetoothDisable MessageIdentifier = 0x14
MessageIdentifierReqBluetoothDisableAck MessageIdentifier = 0x15
MessageIdentifierDisableBluetooth MessageIdentifier = 0x14
MessageIdentifierDisableBluetoothAck MessageIdentifier = 0x15
MessageIdentifierReqXmOutputMode MessageIdentifier = 0x16
MessageIdentifierReqXmOutputModeAck MessageIdentifier = 0x17
MessageIdentifierSetXmOutputMode MessageIdentifier = 0x16
MessageIdentifierSetXmOutputModeAck MessageIdentifier = 0x17
MessageIdentifierReqBaudrate MessageIdentifier = 0x18
MessageIdentifierReqBaudrateAck MessageIdentifier = 0x19
MessageIdentifierSetBaudrate MessageIdentifier = 0x18
MessageIdentifierSetBaudrateAck MessageIdentifier = 0x19
MessageIdentifierReqSyncMode MessageIdentifier = 0x1A
MessageIdentifierReqSyncModeAck MessageIdentifier = 0x1B
MessageIdentifierSetSyncMode MessageIdentifier = 0x1A
MessageIdentifierSetSyncModeAck MessageIdentifier = 0x1B
MessageIdentifierReqProductCode MessageIdentifier = 0x1C
MessageIdentifierProductCode MessageIdentifier = 0x1D
MessageIdentifierReqHWVersion MessageIdentifier = 0x1E
MessageIdentifierHWVersion MessageIdentifier = 0x1F
MessageIdentifierReqProcessingFlags MessageIdentifier = 0x20
MessageIdentifierReqProcessingFlagsAck MessageIdentifier = 0x21
MessageIdentifierSetProcessingFlags MessageIdentifier = 0x20
MessageIdentifierSetProcessingFlagsAck MessageIdentifier = 0x21
MessageIdentifierReqInputTrigger MessageIdentifier = 0x26
MessageIdentifierReqInputTriggerAck MessageIdentifier = 0x27
MessageIdentifierSetInputTrigger MessageIdentifier = 0x26
MessageIdentifierSetInputTriggerAck MessageIdentifier = 0x27
MessageIdentifierReqOutputTrigger MessageIdentifier = 0x28
MessageIdentifierReqOutputTriggerAck MessageIdentifier = 0x29
MessageIdentifierSetOutputTrigger MessageIdentifier = 0x28
MessageIdentifierSetOutputTriggerAck MessageIdentifier = 0x29
MessageIdentifierSetSyncBoxMode MessageIdentifier = 0x2A
MessageIdentifierSetSyncBoxModeAck MessageIdentifier = 0x2B
MessageIdentifierReqSyncBoxMode MessageIdentifier = 0x2A
MessageIdentifierReqSyncBoxModeAck MessageIdentifier = 0x2B
MessageIdentifierSetSyncConfiguration MessageIdentifier = 0x2C
MessageIdentifierSetSyncConfigurationAck MessageIdentifier = 0x2D
MessageIdentifierReqSyncConfiguration MessageIdentifier = 0x2C
MessageIdentifierSyncConfiguration MessageIdentifier = 0x2D
MessageIdentifierDriverDisconnect MessageIdentifier = 0x2E
MessageIdentifierDriverDisconnectAck MessageIdentifier = 0x2F
MessageIdentifierXmPowerOff MessageIdentifier = 0x44
MessageIdentifierReqOutputConfiguration MessageIdentifier = 0xC0
MessageIdentifierReqOutputConfigurationAck MessageIdentifier = 0xC1
MessageIdentifierSetOutputConfiguration MessageIdentifier = 0xC0
MessageIdentifierSetOutputConfigurationAck MessageIdentifier = 0xC1
MessageIdentifierReqOutputMode MessageIdentifier = 0xD0
MessageIdentifierReqOutputModeAck MessageIdentifier = 0xD1
MessageIdentifierSetOutputMode MessageIdentifier = 0xD0
MessageIdentifierSetOutputModeAck MessageIdentifier = 0xD1
MessageIdentifierReqOutputSettings MessageIdentifier = 0xD2
MessageIdentifierReqOutputSettingsAck MessageIdentifier = 0xD3
MessageIdentifierSetOutputSettings MessageIdentifier = 0xD2
MessageIdentifierSetOutputSettingsAck MessageIdentifier = 0xD3
MessageIdentifierReqOutputSkipFactor MessageIdentifier = 0xD4
MessageIdentifierReqOutputSkipFactorAck MessageIdentifier = 0xD5
MessageIdentifierSetOutputSkipFactor MessageIdentifier = 0xD4
MessageIdentifierSetOutputSkipFactorAck MessageIdentifier = 0xD5
MessageIdentifierReqSyncInSettings MessageIdentifier = 0xD6
MessageIdentifierReqSyncInSettingsAck MessageIdentifier = 0xD7
MessageIdentifierSetSyncInSettings MessageIdentifier = 0xD6
MessageIdentifierSetSyncInSettingsAck MessageIdentifier = 0xD7
MessageIdentifierReqSyncOutSettings MessageIdentifier = 0xD8
MessageIdentifierReqSyncOutSettingsAck MessageIdentifier = 0xD9
MessageIdentifierSetSyncOutSettings MessageIdentifier = 0xD8
MessageIdentifierSetSyncOutSettingsAck MessageIdentifier = 0xD9
MessageIdentifierReqErrorMode MessageIdentifier = 0xDA
MessageIdentifierReqErrorModeAck MessageIdentifier = 0xDB
MessageIdentifierSetErrorMode MessageIdentifier = 0xDA
MessageIdentifierSetErrorModeAck MessageIdentifier = 0xDB
MessageIdentifierReqTransmitDelay MessageIdentifier = 0xDC
MessageIdentifierReqTransmitDelayAck MessageIdentifier = 0xDD
MessageIdentifierSetTransmitDelay MessageIdentifier = 0xDC
MessageIdentifierSetTransmitDelayAck MessageIdentifier = 0xDD
MessageIdentifierSetMfmResults MessageIdentifier = 0xDE
MessageIdentifierSetMfmResultsAck MessageIdentifier = 0xDF
MessageIdentifierReqObjectAlignment MessageIdentifier = 0xE0
MessageIdentifierReqObjectAlignmentAck MessageIdentifier = 0xE1
MessageIdentifierSetObjectAlignment MessageIdentifier = 0xE0
MessageIdentifierSetObjectAlignmentAck MessageIdentifier = 0xE1
MessageIdentifierReqXmErrorMode MessageIdentifier = 0x82
MessageIdentifierReqXmErrorModeAck MessageIdentifier = 0x83
MessageIdentifierSetXmErrorMode MessageIdentifier = 0x82
MessageIdentifierSetXmErrorModeAck MessageIdentifier = 0x83
MessageIdentifierReqBufferSize MessageIdentifier = 0x84
MessageIdentifierReqBufferSizeAck MessageIdentifier = 0x85
MessageIdentifierSetBufferSize MessageIdentifier = 0x84
MessageIdentifierSetBufferSizeAck MessageIdentifier = 0x85
MessageIdentifierReqHeading MessageIdentifier = 0x82
MessageIdentifierReqHeadingAck MessageIdentifier = 0x83
MessageIdentifierSetHeading MessageIdentifier = 0x82
MessageIdentifierSetHeadingAck MessageIdentifier = 0x83
MessageIdentifierReqMagneticField MessageIdentifier = 0x6A
MessageIdentifierReqMagneticFieldAck MessageIdentifier = 0x6B
MessageIdentifierSetMagneticField MessageIdentifier = 0x6A
MessageIdentifierSetMagneticFieldAck MessageIdentifier = 0x6B
MessageIdentifierReqLocationID MessageIdentifier = 0x84
MessageIdentifierReqLocationIDAck MessageIdentifier = 0x85
MessageIdentifierSetLocationID MessageIdentifier = 0x84
MessageIdentifierSetLocationIDAck MessageIdentifier = 0x85
MessageIdentifierReqExtOutputMode MessageIdentifier = 0x86
MessageIdentifierReqExtOutputModeAck MessageIdentifier = 0x87
MessageIdentifierSetExtOutputMode MessageIdentifier = 0x86
MessageIdentifierSetExtOutputModeAck MessageIdentifier = 0x87
MessageIdentifierReqBatteryLevel MessageIdentifier = 0x88
MessageIdentifierBatterylevel MessageIdentifier = 0x89
MessageIdentifierReqInitTrackMode MessageIdentifier = 0x88
MessageIdentifierReqInitTrackModeAck MessageIdentifier = 0x89
MessageIdentifierSetInitTrackMode MessageIdentifier = 0x88
MessageIdentifierSetInitTrackModeAck MessageIdentifier = 0x89
MessageIdentifierReqMasterSettings MessageIdentifier = 0x8A
MessageIdentifierMasterSettings MessageIdentifier = 0x8B
MessageIdentifierStoreFilterState MessageIdentifier = 0x8A
MessageIdentifierStoreFilterStateAck MessageIdentifier = 0x8B
MessageIdentifierSetUtcTime MessageIdentifier = 0x60
MessageIdentifierReqUtcTime MessageIdentifier = 0x60
MessageIdentifierSetUtcTimeAck MessageIdentifier = 0x61
MessageIdentifierUtcTime MessageIdentifier = 0x61
MessageIdentifierAdjustUtcTime MessageIdentifier = 0xA8
MessageIdentifierAdjustUtcTimeAck MessageIdentifier = 0xA9
MessageIdentifierReqActiveClockCorrection MessageIdentifier = 0x9C
MessageIdentifierActiveClockCorrection MessageIdentifier = 0x9D
MessageIdentifierStoreActiveClockCorrection MessageIdentifier = 0x9E
MessageIdentifierStoreActiveClockCorrectionAck MessageIdentifier = 0x9F
MessageIdentifierReqAvailableFilterProfiles MessageIdentifier = 0x62
MessageIdentifierAvailableFilterProfiles MessageIdentifier = 0x63
MessageIdentifierReqFilterProfile MessageIdentifier = 0x64
MessageIdentifierReqFilterProfileAck MessageIdentifier = 0x65
MessageIdentifierSetFilterProfile MessageIdentifier = 0x64
MessageIdentifierSetFilterProfileAck MessageIdentifier = 0x65
MessageIdentifierReqGravityMagnitude MessageIdentifier = 0x66
MessageIdentifierReqGravityMagnitudeAck MessageIdentifier = 0x67
MessageIdentifierSetGravityMagnitude MessageIdentifier = 0x66
MessageIdentifierSetGravityMagnitudeAck MessageIdentifier = 0x67
MessageIdentifierReqGpsLeverArm MessageIdentifier = 0x68
MessageIdentifierReqGpsLeverArmAck MessageIdentifier = 0x69
MessageIdentifierSetGpsLeverArm MessageIdentifier = 0x68
MessageIdentifierSetGpsLeverArmAck MessageIdentifier = 0x69
MessageIdentifierReqLatLonAlt MessageIdentifier = 0x6E
MessageIdentifierReqLatLonAltAck MessageIdentifier = 0x6F
MessageIdentifierSetLatLonAlt MessageIdentifier = 0x6E
MessageIdentifierSetLatLonAltAck MessageIdentifier = 0x6F
MessageIdentifierGotoConfig MessageIdentifier = 0x30
MessageIdentifierGotoConfigAck MessageIdentifier = 0x31
MessageIdentifierBusData MessageIdentifier = 0x32
MessageIdentifierMtData MessageIdentifier = 0x32
MessageIdentifierSetNoRotation MessageIdentifier = 0x22
MessageIdentifierSetNoRotationAck MessageIdentifier = 0x23
MessageIdentifierRunSelfTest MessageIdentifier = 0x24
MessageIdentifierSelfTestResults MessageIdentifier = 0x25
MessageIdentifierPrepareData MessageIdentifier = 0x32
MessageIdentifierReqData MessageIdentifier = 0x34
MessageIdentifierReqDataAck MessageIdentifier = 0x35
MessageIdentifierMTData2 MessageIdentifier = 0x36
MessageIdentifierReset MessageIdentifier = 0x40
MessageIdentifierResetAck MessageIdentifier = 0x41
MessageIdentifierError MessageIdentifier = 0x42
MessageIdentifierMasterIndication MessageIdentifier = 0x46
MessageIdentifierStopRecordingIndication MessageIdentifier = 0x12
MessageIdentifierFlushingIndication MessageIdentifier = 0x13
MessageIdentifierReqFilterSettings MessageIdentifier = 0xA0
MessageIdentifierReqFilterSettingsAck MessageIdentifier = 0xA1
MessageIdentifierSetFilterSettings MessageIdentifier = 0xA0
MessageIdentifierSetFilterSettingsAck MessageIdentifier = 0xA1
MessageIdentifierReqAmd MessageIdentifier = 0xA2
MessageIdentifierReqAmdAck MessageIdentifier = 0xA3
MessageIdentifierSetAmd MessageIdentifier = 0xA2
MessageIdentifierSetAmdAck MessageIdentifier = 0xA3
MessageIdentifierResetOrientation MessageIdentifier = 0xA4
MessageIdentifierResetOrientationAck MessageIdentifier = 0xA5
MessageIdentifierReqGpsStatus MessageIdentifier = 0xA6
MessageIdentifierGpsStatus MessageIdentifier = 0xA7
MessageIdentifierWriteDeviceID MessageIdentifier = 0xB0
MessageIdentifierWriteDeviceIDAck MessageIdentifier = 0xB1
MessageIdentifierWriteSecurityKey MessageIdentifier = 0xB2
MessageIdentifierWriteSecurityKeyAck MessageIdentifier = 0xB3
MessageIdentifierProtectFlash MessageIdentifier = 0xB4
MessageIdentifierProtectFlashAck MessageIdentifier = 0xB5
MessageIdentifierReqSecurityCheck MessageIdentifier = 0xB6
MessageIdentifierSecurityCheck MessageIdentifier = 0xB7
MessageIdentifierScanChannels MessageIdentifier = 0xB0
MessageIdentifierScanChannelsAck MessageIdentifier = 0xB1
MessageIdentifierEnableMaster MessageIdentifier = 0xB2
MessageIdentifierEnableMasterAck MessageIdentifier = 0xB3
MessageIdentifierDisableMaster MessageIdentifier = 0xB4
MessageIdentifierDisableMasterAck MessageIdentifier = 0xB5
MessageIdentifierReqRadioChannel MessageIdentifier = 0xB6
MessageIdentifierReqRadioChannelAck MessageIdentifier = 0xB7
MessageIdentifierSetClientPriority MessageIdentifier = 0xB8
MessageIdentifierSetClientPriorityAck MessageIdentifier = 0xB9
MessageIdentifierReqClientPriority MessageIdentifier = 0xB8
MessageIdentifierReqClientPriorityAck MessageIdentifier = 0xB9
MessageIdentifierSetWirelessConfig MessageIdentifier = 0xBA
MessageIdentifierSetWirelessConfigAck MessageIdentifier = 0xBB
MessageIdentifierReqWirelessConfig MessageIdentifier = 0xBA
MessageIdentifierReqWirelessConfigAck MessageIdentifier = 0xBB
MessageIdentifierUpdateBias MessageIdentifier = 0xBC
MessageIdentifierUpdateBiasAck MessageIdentifier = 0xBD
MessageIdentifierToggleIoPins MessageIdentifier = 0xBE
MessageIdentifierToggleIoPinsAck MessageIdentifier = 0xBF
MessageIdentifierSetTransportMode MessageIdentifier = 0xC2
MessageIdentifierSetTransportModeAck MessageIdentifier = 0xC3
MessageIdentifierReqTransportMode MessageIdentifier = 0xC2
MessageIdentifierReqTransportModeAck MessageIdentifier = 0xC3
MessageIdentifierAcceptMtw MessageIdentifier = 0xC4
MessageIdentifierAcceptMtwAck MessageIdentifier = 0xC5
MessageIdentifierRejectMtw MessageIdentifier = 0xC6
MessageIdentifierRejectMtwAck MessageIdentifier = 0xC7
MessageIdentifierInfoRequest MessageIdentifier = 0xC8
MessageIdentifierInfoRequestAck MessageIdentifier = 0xC9
MessageIdentifierReqFrameRates MessageIdentifier = 0xCA
MessageIdentifierReqFrameRatesAck MessageIdentifier = 0xCB
MessageIdentifierStartRecording MessageIdentifier = 0xCC
MessageIdentifierStartRecordingAck MessageIdentifier = 0xCD
MessageIdentifierStopRecording MessageIdentifier = 0xCE
MessageIdentifierStopRecordingAck MessageIdentifier = 0xCF
MessageIdentifierInfoBatteryLevel MessageIdentifier = 0x49
MessageIdentifierInfoTemperature MessageIdentifier = 0x4A
MessageIdentifierGotoOperational MessageIdentifier = 0xC0
MessageIdentifierGotoOperationalAck MessageIdentifier = 0xC1
MessageIdentifierReqEmts MessageIdentifier = 0x90
MessageIdentifierEmtsData MessageIdentifier = 0x91
MessageIdentifierRestoreEmts MessageIdentifier = 0x94
MessageIdentifierRestoreEmtsAck MessageIdentifier = 0x95
MessageIdentifierStoreEmts MessageIdentifier = 0x96
MessageIdentifierStoreEmtsAck MessageIdentifier = 0x97
MessageIdentifierGotoTransparentMode MessageIdentifier = 0x50
MessageIdentifierGotoTransparentModeAck MessageIdentifier = 0x51
MessageIdentifierSetCANConfig MessageIdentifier = 0xE6
MessageIdentifierSetCANConfigAck MessageIdentifier = 0xE7
MessageIdentifierReqCANConfig MessageIdentifier = 0xE6
MessageIdentifierReqCANConfigAck MessageIdentifier = 0xE7
MessageIdentifierSetCANOutputConfig MessageIdentifier = 0xE8
MessageIdentifierSetCANOutputConfigAck MessageIdentifier = 0xE9
MessageIdentifierReqCANOutputConfig MessageIdentifier = 0xE8
MessageIdentifierReqCANOutputConfigAck MessageIdentifier = 0xE9
)