The HNM relies on a policy configuration file to determine which event sources to manage and how to manage them, based on their priorities. The default configuration file is located here:
/etc/system/hmi-notification/policy.cfg
The format is a simple text file that defines a hierarchy (tree) of different sections. Each line of the configuration file can hold at most 1024 characters (additional characters will be truncated from the line when the file is processed). Configuration items are listed within these sections as name-value pairs separated by an equals sign (=).
Each name of a section or subsection is followed by an open brace ({). Names themselves can contain any characters except { and space. A closing brace (}) ends each section or subsection. Any text between a number sign (#) and the end of the line is a comment.
hpm-cfg { modules { Generic { dll = /lib/dll/hmi-notification/event-source-generic.so } HandsFreePhone { dll = /lib/dll/hmi-notification/event-source-handsfree.so event-priorities { HFP_INITIALIZED = 0 HFP_CONNECTED_IDLE = 0 HFP_CALL_OUTGOING_DIALING = 1 HFP_CALL_INCOMING = 1 } } VirtualMechanic { dll = /lib/dll/hmi-notification/event-source-vm.so event-priorities { Caution { fuelLevel = 2 washerFluidLevel = 1 transmissionFluidLevel = 2 coolantLevel = 2 brakeFluidLevel = 2 tirePressure = 1 tireWear = 1 brakePadWear = 1 brakeAbs = 1 engineOilPressure = 2 engineOilLevel = 2 rpm = 0 #temperature = 2 #clutch_wear = 2 lightHead = 2 lightTail = 2 } Alert { fuelLevel = 3 washerFluidLevel = 1 transmissionFluidLevel = 3 coolantLevel = 3 brakeFluidLevel = 3 tirePressure = 2 tireWear = 2 brakePadWear = 2 brakeAbs = 2 engineOilPressure = 3 engineOilLevel = 3 rpm = 0 #temperature = 3 #clutch_wear = 3 lightHead = 3 lightTail = 3 } } } } window-types { Fullscreen { DisplayControl = 0 # Exclusive DefaultPriority = 0 } Overlay { DisplayControl = 0 # Exclusive DefaultPriority = 0 } Notification { DisplayControl = 1 # Semi-Exclusive with 1 display slots. DefaultPriority = 0 } Growl { DisplayControl = -1 # Shared DefaultPriority = 0 } } }
The modules section contains the names of the event-source plugins to be loaded (e.g., VirtualMechanic). Each plugin can contain these subsections:
@Status display:json:[{"name":"Home","type":"Modal"}, {"name":"Alert","type":"Notification"}]
Value | Flag | Description |
---|---|---|
0 | HNM_DISPLAY_EXCLUSIVE | Window type can't share the display with any other exclusive window type. |
1 | HNM_DISPLAY_SEMI_EXCLUSIVE | The value 1 indicates the number of display slots. In this case, the window type can share the display with an exclusive display and with one or more semi-exclusive displays. |
-1 | HNM_DISPLAY_SHARED | Window type can share the display regardless of what is currently being displayed. |