OSDN Git Service

Fix VTS test which turns off radio.
[android-x86/hardware-interfaces.git] / automotive / vehicle / 2.1 / types.hal
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.1 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.1
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package android.hardware.automotive.vehicle@2.1;
18
19 import android.hardware.automotive.vehicle@2.0;
20
21 /**
22  * Extension of VehicleProperty enum declared in Vehicle HAL 2.0
23  */
24 enum VehicleProperty: @2.0::VehicleProperty {
25     /**
26      * Reports wheel rotational distance in meters since last wheel tick
27      * event
28      *
29      * The value is a vector each element represents distance for individual
30      * wheel in the following order: left front, right front, left rear,
31      * right rear. VehiclePropValue.timestamp must be correctly filled in.
32      *
33      * Vendors must specify wheels that support this sensor in
34      * VehiclePropConfig.configFlags. The format of this field is a bitset of
35      * values from Wheel enum.
36      *
37      * @change_mode VehiclePropertyChangeMode:ON_CHANGE |VehiclePropertyChangeMode:CONTINUOUS
38      * @access VehiclePropertyAccess:READ
39      * @unit VehicleUnit:METER
40      */
41     WHEEL_TICK = (
42       0x0306
43       | VehiclePropertyGroup:SYSTEM
44       | VehiclePropertyType:FLOAT_VEC
45       | VehicleArea:GLOBAL),
46
47     /**
48      * OBD2 Live Sensor Data
49      *
50      * This property uses COMPLEX data to send a snapshot of the current (live)
51      * values of the OBD2 sensors provided by the vehicle.
52      *
53      * VehiclePropConfig
54      *   configArray[0] : number of vendor-specific integer-valued sensors
55      *                    that can be returned in a frame.
56      *   configArray[1] : number of vendor-specific float-valued sensors
57      *                    that can be returned in a frame.
58      *
59      * The values are to be interpreted as follows:
60      * the indices defined in Obd2IntegerSensorIndex are to be used to
61      * read from int32Values;
62      * the indices defined in Obd2FloatSensorIndex are to be used to
63      * read from floatValues.
64      * the elements of bytes are to be interpreted as a bitmask, such that
65      * the bits 0 thru the integer value of
66      * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
67      * are 1 if the corresponding index is a valid sensor index whose value can
68      * be read in the returned int32Values vector, 0 otherwise.
69      * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
70      * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
71      * are 1 if the corresponding index is a valid sensor index whose value
72      * can be read in the returned floatValues vector, 0 otherwise.
73      *
74      * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
75      * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
76      * is only valid if the corresponding bits in the bytes vector are set to 1.
77      *
78      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
79      * @access VehiclePropertyAccess:READ
80      */
81     OBD2_LIVE_FRAME = (
82       0x0D00
83       | VehiclePropertyGroup:SYSTEM
84       | VehiclePropertyType:COMPLEX
85       | VehicleArea:GLOBAL),
86
87     /**
88      * OBD2 Freeze Frame Sensor Data
89      *
90      * This property uses COMPLEX data to send a snapshot of the values of the
91      * OBD2 sensors provided by the vehicle at the time that a diagnostic
92      * troubleshooting code (DTC) was recorded by the vehicle.
93      *
94      * VehiclePropConfig
95      *   configArray[0] : number of vendor-specific integer-valued sensors
96      *                    that can be returned in a frame.
97      *   configArray[1] : number of vendor-specific float-valued sensors
98      *                    that can be returned in a frame.
99      *
100      * A get of this property must take the following form:
101      *   int64Values[0]: timestamp of the freeze frame to retrieve.
102      *                   Valid timestamps are given by OBD2_DTC_INFO.
103      *
104      * The values are to be interpreted as follows:
105      * the indices defined in Obd2IntegerSensorIndex are to be used to
106      * read from int32Values;
107      * the indices defined in Obd2FloatSensorIndex are to be used to
108      * read from floatValues;
109      * the elements of bytes are to be interpreted as a bitmask, such that
110      * the bits 0 thru the integer value of
111      * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
112      * are 1 if the corresponding index is a valid sensor index whose value can
113      * be read in the returned int32Values vector, 0 otherwise.
114      * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
115      * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
116      * are 1 if the corresponding index is a valid sensor index whose value
117      * can be read in the returned floatValues vector, 0 otherwise.
118      * stringValue is the DTC that caused this freeze frame to be recorded.
119      *
120      * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
121      * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
122      * is only valid if the corresponding bits in the bytes vector are set to 1,
123      * and a possible valid stringValue is "P0176" to indicate a malfunction
124      * of the fuel composition sensor circuit.
125      *
126      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
127      * @access VehiclePropertyAccess:READ
128      */
129     OBD2_FREEZE_FRAME = (
130       0x0D01
131       | VehiclePropertyGroup:SYSTEM
132       | VehiclePropertyType:COMPLEX
133       | VehicleArea:GLOBAL),
134
135     /**
136      * OBD2 Freeze Frame Information
137      *
138      * This property describes the current freeze frames stored in vehicle
139      * memory and available for retrieval via OBD2_FREEZE_FRAME.
140      *
141      * The values are to be interpreted as follows:
142      * each element of int64Values is the timestamp at which a a fault code
143      * has been detected and the corresponding freeze frame stored, and each
144      * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
145      * the corresponding freeze frame.
146      *
147      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
148      * @access VehiclePropertyAccess:READ
149      */
150     OBD2_FREEZE_FRAME_INFO = (
151       0x0D02
152       | VehiclePropertyGroup:SYSTEM
153       | VehiclePropertyType:COMPLEX
154       | VehicleArea:GLOBAL),
155
156     /**
157      * OBD2 Freeze Frame Clear
158      *
159      * This property allows deletion of any of the freeze frames stored in
160      * vehicle memory, as described by OBD2_DTC_INFO.
161      *
162      * A set of this property is to be interpreted as follows:
163      * if int64Values contains no elements, then all DTCs stored will be cleared;
164      * if int64Values contains one or more elements, then DTCs at the timestamps
165      * stored in int64Values will be cleared, and the others not cleared, except
166      * the memory will be compacted so that all remaining DTCs are stored
167      * contiguously.
168      *
169      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
170      * @access VehiclePropertyAccess:WRITE
171      */
172     OBD2_FREEZE_FRAME_CLEAR = (
173       0x0D03
174       | VehiclePropertyGroup:SYSTEM
175       | VehiclePropertyType:COMPLEX
176       | VehicleArea:GLOBAL),
177
178     /**
179      * Vehicle Maps Service (VMS) message
180      *
181      * This property uses COMPLEX data to communicate vms messages.
182      *
183      * Its contents are to be interpreted as follows:
184      * the indices defined in VmsMessageIntegerValuesIndex are to be used to
185      * read from int32Values;
186      * bytes is a serialized VMS message as defined in the vms protocol
187      * which is opaque to the framework;
188      *
189      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
190      * @access VehiclePropertyAccess:READ_WRITE
191      */
192     VEHICLE_MAP_SERVICE = (
193         0x0C00
194         | VehiclePropertyGroup:SYSTEM
195         | VehiclePropertyType:COMPLEX
196         | VehicleArea:GLOBAL),
197 };
198
199 /** The status of a fuel system as described by the OBD2 specification. */
200 enum FuelSystemStatus : int32_t {
201   OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
202
203   CLOSED_LOOP = 2,
204
205   OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
206
207   OPEN_SYSTEM_FAILURE = 8,
208
209   CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
210 };
211
212 /** Defines which ignition monitors are available to be read. */
213 enum IgnitionMonitorKind : int32_t {
214   SPARK = 0,
215
216   COMPRESSION = 1,
217 };
218
219 /** These ignition monitors are common to both SPARK and COMPRESSION. */
220 enum CommonIgnitionMonitors : int32_t {
221   COMPONENTS_AVAILABLE = 0x1 << 0,
222   COMPONENTS_INCOMPLETE = 0x1 << 1,
223
224   FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
225   FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
226
227   MISFIRE_AVAILABLE = 0x1 << 4,
228   MISFIRE_INCOMPLETE = 0x1 << 5,
229 };
230
231 /** Ignition monitors available for SPARK vehicles. */
232 enum SparkIgnitionMonitors : CommonIgnitionMonitors {
233   EGR_AVAILABLE = 0x1 << 6,
234   EGR_INCOMPLETE = 0x1 << 7,
235
236   OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
237   OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
238
239   OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
240   OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
241
242   AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
243   AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
244
245   SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
246   SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
247
248   EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
249   EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
250
251   HEATED_CATALYST_AVAILABLE = 0x1 << 18,
252   HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
253
254   CATALYST_AVAILABLE = 0x1 << 20,
255   CATALYST_INCOMPLETE = 0x1 << 21,
256 };
257
258 /** Ignition monitors only available for COMPRESSION vehicles. */
259 enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
260   EGR_OR_VVT_AVAILABLE = 0x1 << 6,
261   EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
262
263   PM_FILTER_AVAILABLE = 0x1 << 8,
264   PM_FILTER_INCOMPLETE = 0x1 << 9,
265
266   EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
267   EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
268
269   BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
270   BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
271
272   NOx_SCR__AVAILABLE = 0x1 << 14,
273   NOx_SCR_INCOMPLETE = 0x1 << 15,
274
275   NMHC_CATALYST_AVAILABLE = 0x1 << 16,
276   NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
277 };
278
279 enum SecondaryAirStatus : int32_t {
280   UPSTREAM = 1,
281
282   DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
283
284   FROM_OUTSIDE_OR_OFF = 4,
285
286   PUMP_ON_FOR_DIAGNOSTICS = 8,
287 };
288
289 enum FuelType : int32_t {
290   NOT_AVAILABLE = 0,
291
292   GASOLINE = 1,
293
294   METHANOL = 2,
295
296   ETHANOL = 3,
297
298   DIESEL = 4,
299
300   LPG = 5,
301
302   CNG = 6,
303
304   PROPANE = 7,
305
306   ELECTRIC = 8,
307
308   BIFUEL_RUNNING_GASOLINE = 9,
309
310   BIFUEL_RUNNING_METHANOL = 10,
311
312   BIFUEL_RUNNING_ETHANOL = 11,
313
314   BIFUEL_RUNNING_LPG = 12,
315
316   BIFUEL_RUNNING_CNG = 13,
317
318   BIFUEL_RUNNING_PROPANE = 14,
319
320   BIFUEL_RUNNING_ELECTRIC = 15,
321
322   BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
323
324   HYBRID_GASOLINE = 17,
325
326   HYBRID_ETHANOL = 18,
327
328   HYBRID_DIESEL = 19,
329
330   HYBRID_ELECTRIC = 20,
331
332   HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
333
334   HYBRID_REGENERATIVE = 22,
335
336   BIFUEL_RUNNING_DIESEL = 23,
337 };
338
339 /**
340  * This enum provides the canonical mapping for sensor properties that have an integer value.
341  * The ordering of the values is taken from the OBD2 specification.
342  * Some of the properties are represented as an integer mapping to another enum. In those cases
343  * expect a comment by the property definition describing the enum to look at for the mapping.
344  * Any value greater than the last reserved index is available to vendors to map their extensions.
345  */
346 enum Obd2IntegerSensorIndex : int32_t {
347   /** refer to FuelSystemStatus for a description of this value. */
348   FUEL_SYSTEM_STATUS = 0,
349
350   MALFUNCTION_INDICATOR_LIGHT_ON = 1,
351
352   /** refer to IgnitionMonitorKind for a description of this value. */
353   IGNITION_MONITORS_SUPPORTED = 2,
354
355   /**
356    * The value of this sensor is a bitmask that specifies whether ignition-specific
357    * tests are available and whether they are complete. The semantics of the individual
358    * bits in this value are given by, respectively, SparkIgnitionMonitors and
359    * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
360    */
361   IGNITION_SPECIFIC_MONITORS = 3,
362
363   INTAKE_AIR_TEMPERATURE = 4,
364
365   /** refer to SecondaryAirStatus for a description of this value. */
366   COMMANDED_SECONDARY_AIR_STATUS = 5,
367
368   NUM_OXYGEN_SENSORS_PRESENT = 6,
369
370   RUNTIME_SINCE_ENGINE_START = 7,
371
372   DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
373
374   WARMUPS_SINCE_CODES_CLEARED = 9,
375
376   DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
377
378   ABSOLUTE_BAROMETRIC_PRESSURE = 11,
379
380   CONTROL_MODULE_VOLTAGE = 12,
381
382   AMBIENT_AIR_TEMPERATURE = 13,
383
384   TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
385
386   TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
387
388   MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
389
390   MAX_OXYGEN_SENSOR_VOLTAGE = 17,
391
392   MAX_OXYGEN_SENSOR_CURRENT = 18,
393
394   MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
395
396   MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
397
398   /** refer to FuelType for a description of this value. */
399   FUEL_TYPE = 21,
400
401   FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
402
403   ENGINE_OIL_TEMPERATURE = 23,
404
405   DRIVER_DEMAND_PERCENT_TORQUE = 24,
406
407   ENGINE_ACTUAL_PERCENT_TORQUE = 25,
408
409   ENGINE_REFERENCE_PERCENT_TORQUE = 26,
410
411   ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
412
413   ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
414
415   ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
416
417   ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
418
419   ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
420
421   LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
422 };
423
424 /**
425  * This enum provides the canonical mapping for sensor properties that have a floating-point value.
426  * The ordering of the values is taken from the OBD2 specification.
427  * Any value greater than the last reserved index is available to vendors to map their extensions.
428  */
429 enum Obd2FloatSensorIndex : int32_t {
430   CALCULATED_ENGINE_LOAD = 0,
431
432   ENGINE_COOLANT_TEMPERATURE = 1,
433
434   SHORT_TERM_FUEL_TRIM_BANK1 = 2,
435
436   LONG_TERM_FUEL_TRIM_BANK1 = 3,
437
438   SHORT_TERM_FUEL_TRIM_BANK2 = 4,
439
440   LONG_TERM_FUEL_TRIM_BANK2 = 5,
441
442   FUEL_PRESSURE = 6,
443
444   INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
445
446   ENGINE_RPM = 8,
447
448   VEHICLE_SPEED = 9,
449
450   TIMING_ADVANCE = 10,
451
452   MAF_AIR_FLOW_RATE = 11,
453
454   THROTTLE_POSITION = 12,
455
456   OXYGEN_SENSOR1_VOLTAGE = 13,
457
458   OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
459
460   OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
461
462   OXYGEN_SENSOR2_VOLTAGE = 16,
463
464   OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
465
466   OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
467
468   OXYGEN_SENSOR3_VOLTAGE = 19,
469
470   OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
471
472   OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
473
474   OXYGEN_SENSOR4_VOLTAGE = 22,
475
476   OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
477
478   OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
479
480   OXYGEN_SENSOR5_VOLTAGE = 25,
481
482   OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
483
484   OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
485
486   OXYGEN_SENSOR6_VOLTAGE = 28,
487
488   OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
489
490   OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
491
492   OXYGEN_SENSOR7_VOLTAGE = 31,
493
494   OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
495
496   OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
497
498   OXYGEN_SENSOR8_VOLTAGE = 34,
499
500   OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
501
502   OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
503
504   FUEL_RAIL_PRESSURE = 37,
505
506   FUEL_RAIL_GAUGE_PRESSURE = 38,
507
508   COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
509
510   EXHAUST_GAS_RECIRCULATION_ERROR = 40,
511
512   COMMANDED_EVAPORATIVE_PURGE = 41,
513
514   FUEL_TANK_LEVEL_INPUT = 42,
515
516   EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
517
518   CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
519
520   CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
521
522   CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
523
524   CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
525
526   ABSOLUTE_LOAD_VALUE = 48,
527
528   FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
529
530   RELATIVE_THROTTLE_POSITION = 50,
531
532   ABSOLUTE_THROTTLE_POSITION_B = 51,
533
534   ABSOLUTE_THROTTLE_POSITION_C = 52,
535
536   ACCELERATOR_PEDAL_POSITION_D = 53,
537
538   ACCELERATOR_PEDAL_POSITION_E = 54,
539
540   ACCELERATOR_PEDAL_POSITION_F = 55,
541
542   COMMANDED_THROTTLE_ACTUATOR = 56,
543
544   ETHANOL_FUEL_PERCENTAGE = 57,
545
546   ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
547
548   SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
549
550   SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
551
552   SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
553
554   SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
555
556   LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
557
558   LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
559
560   LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
561
562   LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
563
564   RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
565
566   HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
567
568   FUEL_INJECTION_TIMING = 69,
569
570   ENGINE_FUEL_RATE = 70,
571
572   LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
573 };
574
575 /**
576  * This enum lists the types of supported VMS messages.
577  */
578 enum VmsMessageType : int32_t {
579   /** A client subscribes to a layer. */
580   SUBSCRIBE = 1,
581
582   /** A client unsubscribes from a layer. */
583   UNSUBSCRIBE = 2,
584
585   /** A client publishes a data packet. */
586   DATA = 3,
587
588   /* A client declaring layers offering. */
589   OFFERING = 4,
590
591   /* Requesting the list of available layers. */
592   AVAILABILITY_REQUEST = 5,
593
594   /* Returning the list of available layers. */
595   AVAILABILITY_RESPONSE = 6,
596
597   /** Requesting layers that have subscribers. */
598   SUBSCRIPTION_REQUEST = 7,
599
600   /** Returning layers that have subscribers. */
601   SUBSCRIPTION_RESPONSE = 8,
602 };
603
604 /**
605  * This enum provides the canonical mapping for VMS properties that have an
606  * integer value.
607  */
608 enum VmsBaseMessageIntegerValuesIndex : int32_t {
609   /* The message type as enumerated by VmsMessageType enum. */
610   VMS_MESSAGE_TYPE = 0,
611 };
612
613 /*
614  * This enum provides the canonical mapping for VMS SUBMIT, UNSUBMIT and DATA
615  * messages integer value properties.
616  */
617 enum VmsSimpleMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
618   /* The layer ID as defined in the vms protocol. */
619   VMS_LAYER_ID = 1,
620
621   /* The version of the VMS layer. */
622   VMS_LAYER_VERSION = 2,
623 };
624
625 /*
626  * This enum provides the canonical mapping for VMS offering messages integer
627  * value properties
628  */
629 enum VmsOfferingMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
630   /* The number of VMS layer dependencies. */
631   VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 1,
632
633   /* The first index that contain dependencies */
634   FIRST_DEPENDENCIES_INDEX = 2,
635 };
636
637 /**
638  * A VMS subscription request only contains its message type. The format of a VMS subscription
639  * response is described below.
640  */
641 enum VmsSubscriptionResponseFormat : VmsBaseMessageIntegerValuesIndex {
642   /**
643     * Recipients should ignore any packet with a sequence number that is less than the highest
644     * sequence number they have seen thus far.
645     */
646   SEQUENCE_NUMBER = 1,
647
648   /** The number of VMS layers. Each layer has two integers: type and version. */
649   NUMBER_OF_LAYERS = 2,
650
651   /** The first index that contains a layer. */
652   FIRST_LAYER = 3,
653 };