diff --git a/README.md b/README.md index e25763a7a..ecd909eda 100644 --- a/README.md +++ b/README.md @@ -38,22 +38,74 @@ value, such as 3400. Signals are organized into a tree such as outlined below. -![Signal tree](https://github.com/PDXostc/vehicle_signal_interface/raw/master/pics/tree.png) +![Signal tree](pics/tree.png)
+*Fig 1. A signal tree example* + +## SIGNAL TYPE +Each signal specifies a type from the following set (from FrancaIDL): + +Name | Type | Min | Max +-----------|----------------------------|------|--- +UInt8 | unsigned 8-bit integer |0 | 255 +Int8 | signed 8-bit integer | -128 | 127 +UInt16 | unsigned 16-bit integer | 0 | 65535 +Int16 | signed 16-bit integer | -32768 | 32767 +UInt32 | unsigned 32-bit integer | 0 | 4294967295 +Int32 | signed 32-bit integer | -2147483648 | 2147483647 +UInt64 | unsigned 64-bit integer | 0 | 2^64 +Int64 | signed 64-bit integer | -2^63 | 2^63 - 1 +Boolean | boolean value | 0/false | 1/true +Float | floating point number | -3.4e -38 | 3.4e 38 +Double | double precision floating point number | -1.7e -300 | 1.7e 300 +String | character string | n/a | n/a +ByteBuffer | buffer of bytes (aka BLOB) | n/a | n/a + +## SIGNAL RANGE [OPTIONAL] +A signal can optionally be specified with a min and max limit, +defining a range that the signal can assume a value within. + +## SIGNAL ENUMERATION [OPTIONAL] +A signal can optionally be specified with a set of allowed values that +the signal can take, effectively turning it into an enumerator. The +values are of the same type as the signal itself. + +## SIGNAL UNIT TYPE [OPTIONAL] +A signal can optionally specify a unit type from the following set: + +Unit type | Domain | Description +-----------|--------------------- +kph | Speed | Kilometers per hour +celsius | Temperature | Degrees celsius +mbar | Pressure | millibar +percent | Percent | Percent +hz | frequency | Frequency +lat | position | Decimal latitude +lon | position | Decimal longitude +millimeter | distance | Millimeter +meter | distance | Meter +kilometer | distance | Kilometer +[more to come] || + +## SIGNAL NAMING CONVENTION +Signals are named, left-to-right, from the root of the signal tree +toward the signal itself. Each element in the name is deliniated with +a period (".") . + +In Fig 1 above the left mirror heated signal would be: + + body.mirrors.left.heated -Signal naming convention - -Node vs. tree -What constitutes a signal -Setter vs. Current signals -Interval - # SIGNAL SPECIFICATION FORMAT ## ENTRY +### TYPE +### INTERVAL +### ENUMERATION + ## FILE ## INCLUDE DIRECTIVES diff --git a/pics/tree.png b/pics/tree.png index 3eb0cd22e..179aa5309 100644 Binary files a/pics/tree.png and b/pics/tree.png differ diff --git a/root.vspec b/root.vspec index b0af65d5f..2a4886227 100644 --- a/root.vspec +++ b/root.vspec @@ -68,6 +68,16 @@ something.vsi "description": "0=max forward. 100=max backward" } +{ + "name": "seats.0.massage_level" + "type": { + "type": "Uint16", + "unit_type": "percent", + "enum": [ 1,2,5,6,12] + } + "description": "0=max forward. 100=max backward" +} + { "name": "seats.driver_seat.position" "type": {