Core Types for Context properties ================================= Fundamental types ----------------- anchor:type-value[] *value*:: Any representable value. + anchor:type-bool[] *bool*:: A boolean. + Base: link:core-types.html#type-value[value] anchor:type-number[] *number*:: A number with in the range indicated by the "min" and "max" parameters. The value is represented as either a "int32", "uint32", "int64", "uint64", or "double". + min (link:core-types.html#type-number[number]): Lower bound + max (link:core-types.html#type-number[number]): Upper bound + Base: link:core-types.html#type-value[value] anchor:type-integer[] *integer*:: A integer, represented as any of the numeric types. If the value is a "double", it is rounded to an integer, but not necessarily to the nearest. The "min" and "max" parameters, when given, constrain the range of the integer. + min (link:core-types.html#type-number[number]): Lower bound + max (link:core-types.html#type-number[number]): Upper bound + Base: link:core-types.html#type-number[number] anchor:type-string[] *string*:: A string. + Base: link:core-types.html#type-value[value] anchor:type-list[] *list*:: A list with elements of the given type and minimum and maximum length given by the "min" and "max" parameters, respectively. + When the "type" parameter is omitted, it defaults to "value". + min (link:core-types.html#type-integer[integer]): Minimum length + max (link:core-types.html#type-integer[integer]): Maximum length + type (link:core-types.html#type-type[type]): Element type + Base: link:core-types.html#type-value[value] anchor:type-map[] *map*:: A map. The parameters specify the allowed keys in the map. + Each parameter is a association tree that describes one possible key. The name of the tree is the key itself, and the second level of the tree can have "doc" and "type" attributes for that key. + When the special key name "allow-other-keys" is present, all keys are allowed; otherwise, only the specified keys have any meaning and additional keys are an error. + When no parameters are given, all keys are allowed. + rest: The allowed keys + Base: link:core-types.html#type-value[value] Generic types ------------- anchor:type-association-tree[] *association-tree*:: A tree made from nested lists, used to associate (hierarchical) keys with values. + For example, the association tree + [ "foo", [ "bar", 12 ], [ "baz", 42 ] ] + associates "foo", "bar" with 12 and "foo", "baz" with 42. + Association trees are often used as a simple "Nano DOM" for XML documents. + Formally, a association tree is a list whose first element is a string, and whose rest elements are either association trees, or a single value. + The "name" of a association tree is the first element of its top-level list. + As a special case, a association tree with just a name and no other elements can be abbreviated by just stating the name as a string. E.g., the following two values are equivalent when considered as a association tree: + "foo" [ "foo" ] + Base: link:core-types.html#type-value[value] anchor:type-association-list[] *association-list*:: A list of association trees. + Base: List of __link:core-types.html#type-association-tree[association-tree]__s anchor:type-string-enum[] *string-enum*:: This is the base type for enumerations of fixed strings. The parameters describe the possible values. + Each parameter is a association tree that describes one of the choices. The name of the association tree is the string for the choice itself and the second level of the tree can have a "doc" attribute for that choice. + rest: The possible values + Base: link:core-types.html#type-string[string] anchor:type-int-enum[] *int-enum*:: This is the base type for enumerations of fixed integers. The parameters describe the possible values. + Each parameter is a association tree that describes one of the choices. The name of the association tree is a symbolic name for the choice itself and the second level of the tree must have a "value" attribute that gives the numerical value of the choice in decimal. A choice can also have a "doc" attribute, of course. + rest: The possible values + Base: link:core-types.html#type-integer[integer] Specific types -------------- anchor:type-type[] *type*:: A reference to a type, consisting of a name and optional parameters. + Type references are just association trees: the name of the tree names the referenced type, and the associations of the association tree are the parameters. + Base: link:core-types.html#type-association-tree[association-tree] anchor:type-temperature[] *temperature*:: A temperature in Kelvin. + Base: link:core-types.html#type-number[number] + -- Type parameters: [horizontal] min :: 0 -- anchor:type-energy[] *energy*:: An amount of energy, in Joule. + Base: link:core-types.html#type-number[number] anchor:type-power[] *power*:: A power, in Watt. + Base: link:core-types.html#type-number[number] anchor:type-time[] *time*:: A point in time, represented as the number of nano-seconds since 00:00 January 1, 1970, UTC. + Base: link:core-types.html#type-integer[integer] anchor:type-distance[] *distance*:: A physical length between two points, in meters. + Base: link:core-types.html#type-integer[integer] anchor:type-duration[] *duration*:: A time duration, in nano-seconds. + Base: link:core-types.html#type-integer[integer] anchor:type-percentage[] *percentage*:: A percentage. + Base: link:core-types.html#type-integer[integer] + -- Type parameters: [horizontal] min :: 0 max :: 100 -- anchor:type-location-source[] *location-source*:: Describes a source of location information. Possible values are "satellite", "wlan", "cellular", and "timezone". + Base: Enumeration of __string__s + -- Possible enumeration values: [horizontal] satellite:: wlan:: cellular:: timezone:: -- anchor:type-tracker-uri[] *tracker-uri*:: A URI that names a object in the Tracker object store. + Base: link:core-types.html#type-string[string]