<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scable</id>
		<title>miniSim - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.nads-sc.uiowa.edu/minisim/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scable"/>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Special:Contributions/Scable"/>
		<updated>2026-05-03T03:47:27Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3907</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3907"/>
				<updated>2023-08-14T06:38:37Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Editing Albums/Streaming Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;'''ARTIST''' - '''ALBUM_NAME'''&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
:*A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
:*A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
:*&amp;quot;favorite.fav&amp;quot; (Optional) (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
'''TRACK_NUMBER''' - '''TRACK_NAME'''.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;02 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the album store for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
=== Editing Phone Call History and Contact List ===&lt;br /&gt;
Text message selections are defined in the '''phone_config.csv''' file located in the infotainment installation directory. The  object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Infotainment - Phone app configuration&lt;br /&gt;
//&lt;br /&gt;
// CALL_HISTORY&lt;br /&gt;
// Defines a predefined call history menu (#CALL_HISTORY_container contents) in the order defined below&lt;br /&gt;
// (Maximum 100 entries)&lt;br /&gt;
Michael K., 45 min ago&lt;br /&gt;
Shelby F., 1 hour ago&lt;br /&gt;
Julia W., Yesterday&lt;br /&gt;
Erika M., 4 days ago&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
// CONTACTS&lt;br /&gt;
// Defines call history menu (#CALL_CONTACTS_container contents) in the order defined below&lt;br /&gt;
// (Maximum 100 entries)&lt;br /&gt;
Aaron G.&lt;br /&gt;
Alec L.&lt;br /&gt;
Ashley B.&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The // CALL_HISTORY and // CONTACTS lines are required to delineate between the two groups. A Call History line is the CONTACT_NAME,TIME_OF_CALL (note the separating comma). Both are treated as string values, so can either be a number (319-123-3345) or a text value , as long as that text value doesn't include a comma.&lt;br /&gt;
&lt;br /&gt;
Contacts lines are simpler, only containing one value (CONTACT_NAME). Again, this can be any value, as long as it doesn't include commas.&lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the phone app configuration for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Editing Text Messages ===&lt;br /&gt;
Text message selections are defined in the '''messages_config.json''' file located in the infotainment installation directory. The JSON object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;messaging_history&amp;quot; : {&lt;br /&gt;
        &amp;quot;entry_list&amp;quot; : [{&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;32 min ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Ashley&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;What time will you be done with work today?&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;2 hours ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Sarah&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;Thank you for sending me those notes!&amp;quot;&lt;br /&gt;
        }, ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the list of text messages for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3906</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3906"/>
				<updated>2023-08-13T19:45:44Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;'''ARTIST''' - '''ALBUM_NAME'''&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
'''TRACK_NUMBER''' - '''TRACK_NAME'''.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;02 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the album store for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Editing Phone Call History and Contact List ===&lt;br /&gt;
Text message selections are defined in the '''phone_config.csv''' file located in the infotainment installation directory. The  object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Infotainment - Phone app configuration&lt;br /&gt;
//&lt;br /&gt;
// CALL_HISTORY&lt;br /&gt;
// Defines a predefined call history menu (#CALL_HISTORY_container contents) in the order defined below&lt;br /&gt;
// (Maximum 100 entries)&lt;br /&gt;
Michael K., 45 min ago&lt;br /&gt;
Shelby F., 1 hour ago&lt;br /&gt;
Julia W., Yesterday&lt;br /&gt;
Erika M., 4 days ago&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
// CONTACTS&lt;br /&gt;
// Defines call history menu (#CALL_CONTACTS_container contents) in the order defined below&lt;br /&gt;
// (Maximum 100 entries)&lt;br /&gt;
Aaron G.&lt;br /&gt;
Alec L.&lt;br /&gt;
Ashley B.&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The // CALL_HISTORY and // CONTACTS lines are required to delineate between the two groups. A Call History line is the CONTACT_NAME,TIME_OF_CALL (note the separating comma). Both are treated as string values, so can either be a number (319-123-3345) or a text value , as long as that text value doesn't include a comma.&lt;br /&gt;
&lt;br /&gt;
Contacts lines are simpler, only containing one value (CONTACT_NAME). Again, this can be any value, as long as it doesn't include commas.&lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the phone app configuration for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Editing Text Messages ===&lt;br /&gt;
Text message selections are defined in the '''messages_config.json''' file located in the infotainment installation directory. The JSON object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;messaging_history&amp;quot; : {&lt;br /&gt;
        &amp;quot;entry_list&amp;quot; : [{&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;32 min ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Ashley&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;What time will you be done with work today?&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;2 hours ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Sarah&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;Thank you for sending me those notes!&amp;quot;&lt;br /&gt;
        }, ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the list of text messages for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3905</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3905"/>
				<updated>2023-08-13T19:37:31Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;'''ARTIST''' - '''ALBUM_NAME'''&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
'''TRACK_NUMBER''' - '''TRACK_NAME'''.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;02 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the album store for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Editing Text Messages ===&lt;br /&gt;
Text message selections are defined in the '''messages_config.json''' file located in the infotainment installation directory. The JSON object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;messaging_history&amp;quot; : {&lt;br /&gt;
        &amp;quot;entry_list&amp;quot; : [{&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;32 min ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Ashley&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;What time will you be done with work today?&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;2 hours ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Sarah&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;Thank you for sending me those notes!&amp;quot;&lt;br /&gt;
        }, ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the list of text messages for the changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3904</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3904"/>
				<updated>2023-08-13T19:36:05Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;'''ARTIST''' - '''ALBUM_NAME'''&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
'''TRACK_NUMBER''' - '''TRACK_NAME'''.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;02 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
The infotainment server '''must be restarted''' after modifying the album store.&lt;br /&gt;
&lt;br /&gt;
=== Editing Text Messages ===&lt;br /&gt;
Text message selections are defined in the '''messages_config.json''' file located in the infotainment installation directory. The JSON object is organized as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;messaging_history&amp;quot; : {&lt;br /&gt;
        &amp;quot;entry_list&amp;quot; : [{&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;32 min ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Ashley&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;What time will you be done with work today?&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;message_date&amp;quot; : &amp;quot;2 hours ago&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_name&amp;quot; : &amp;quot;Sarah&amp;quot;,&lt;br /&gt;
            &amp;quot;contact_number&amp;quot; : &amp;quot;3035559999&amp;quot;,&lt;br /&gt;
            &amp;quot;message&amp;quot; : &amp;quot;Thank you for sending me those notes!&amp;quot;&lt;br /&gt;
        }, ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3903</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3903"/>
				<updated>2023-08-13T19:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Editing Albums/Streaming Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;'''ARTIST''' - '''ALBUM_NAME'''&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
'''TRACK_NUMBER''' - '''TRACK_NAME'''.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;02 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3902</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3902"/>
				<updated>2023-08-13T19:29:58Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;ARTIST - ALBUM_NAME&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
TRACK_NUMBER - TRACK_NAME.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, &amp;quot;01 - Can't Stand It.mp3&amp;quot;, &amp;quot;01 - She's a Jar.mp3&amp;quot;... ) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3901</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3901"/>
				<updated>2023-08-13T19:27:46Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Editing Albums/Streaming Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;ARTIST - ALBUM_NAME&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;album&amp;quot; directory should contain:&lt;br /&gt;
- A group of MP3 files (these will serve as the album tracks)&lt;br /&gt;
- A single image JPG. This is treated as the album cover graphic. The filename can be anything.&lt;br /&gt;
- &amp;quot;favorite.fav&amp;quot; (This file is used as a marker for albums that would appear in a skin's &amp;quot;Favorites&amp;quot; listing. It is completely optional.)&lt;br /&gt;
&lt;br /&gt;
These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:&lt;br /&gt;
&lt;br /&gt;
TRACK_NUMBER - TRACK_NAME.mp3&lt;br /&gt;
&lt;br /&gt;
...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3900</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3900"/>
				<updated>2023-08-13T19:20:14Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Editing Albums/Streaming Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the '''infotainment_config.txt''' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;ARTIST - ALBUM_NAME&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3899</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3899"/>
				<updated>2023-08-13T19:19:35Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the infotainment_config.txt file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;ARTIST - ALBUM_NAME&amp;quot;, substituting ARTIST for the artist's name, and the album name for ALBUM_NAME. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	<entry>
		<id>https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3898</id>
		<title>Infotainment System - Technical Overview</title>
		<link rel="alternate" type="text/html" href="https://www.nads-sc.uiowa.edu/minisim/wiki/index.php?title=Infotainment_System_-_Technical_Overview&amp;diff=3898"/>
				<updated>2023-08-13T19:17:44Z</updated>
		
		<summary type="html">&lt;p&gt;Scable: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Architecture ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; max-width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_genr_functional_diagram.jpg&amp;quot; style=&amp;quot;margin-bottom:1em; margin-left:1em; border:1px solid #AAA;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
The core of the Infotainment system is written in [https://nodejs.org Node.js]. It establishes an Express web server, then uses [http://socket.io Socket.IO] to manage connections to different control and/or display surfaces.  Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser). &lt;br /&gt;
&lt;br /&gt;
In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).&lt;br /&gt;
&lt;br /&gt;
=== Host script ===&lt;br /&gt;
:The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.&lt;br /&gt;
&lt;br /&gt;
:For it's real time interface to a miniSim, the Infotainment system leverages the [[Route Table]] to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.&lt;br /&gt;
&lt;br /&gt;
=== Audio handler(s) ===&lt;br /&gt;
:By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback: &lt;br /&gt;
:*Media playback&lt;br /&gt;
:*Alert (temporarily mutes media playback on play)&lt;br /&gt;
:*Notify&lt;br /&gt;
&lt;br /&gt;
:Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and &amp;quot;radio&amp;quot; media streams. &lt;br /&gt;
:The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.&lt;br /&gt;
:The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:42%; float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;../images/infotainment_home_ex.jpg&amp;quot; style=&amp;quot;margin-bottom:1em;&amp;quot; class=&amp;quot;img-responsive&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
:Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):&lt;br /&gt;
:*Standard OEM-like infotainment interfaces&lt;br /&gt;
:*Reconfigurable instrument cluster displays&lt;br /&gt;
:*General touch and/or voice interfaces&lt;br /&gt;
:*Head-up displays (HUDs)&lt;br /&gt;
:*&amp;quot;Alert&amp;quot; devices&lt;br /&gt;
&lt;br /&gt;
:By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher &amp;quot;mirror&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:;[[Infotainment System - Skins|Infotainment Skins]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
=== Editing Albums/Streaming Options ===&lt;br /&gt;
Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the infotainment_config.txt file.&lt;br /&gt;
&lt;br /&gt;
In that directory, all directories are treated as &amp;quot;albums&amp;quot;, organized in alphabetical order. &amp;quot;Album&amp;quot; directories should be labeled as &amp;quot;ARTIST - ALBUMNAME&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
=== Touch ===&lt;br /&gt;
The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the '''AUX_Info_Cursor''' and '''AUX_Info_Button''' cells respectively.&lt;br /&gt;
&lt;br /&gt;
By default, single touches are recorded automatically.&lt;br /&gt;
&lt;br /&gt;
New buttons can be configured by adding HTML elements with a class of &amp;quot;button&amp;quot; (generally visually reactive buttons) or &amp;quot;buttonI&amp;quot; (&amp;quot;invisible&amp;quot; buttons) while having a unique button ID data element (ie, ''data-bid=&amp;quot;4032&amp;quot;'').&lt;br /&gt;
&lt;br /&gt;
=== UDP ===&lt;br /&gt;
The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the '''infotainment_config.txt''' file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the '''CAB_HOST_IP''' and '''RT_PORT_INCOMING''' variables.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// Local IP address of the infotainment server&lt;br /&gt;
var CAB_HOST_IP = '192.168.0.105';&lt;br /&gt;
...&lt;br /&gt;
var RT_PORT_INCOMING = 8901;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.&lt;br /&gt;
&lt;br /&gt;
The RT (realtime) stream assumes the following packet configuration:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|SimFrame&lt;br /&gt;
|1 int&lt;br /&gt;
|The current simulation frame&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|SCC_Info_Screen&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane&lt;br /&gt;
| 0,0 (no effect, default state)&lt;br /&gt;
|-&lt;br /&gt;
|CFS_TRANS_Igntn&lt;br /&gt;
|1 int&lt;br /&gt;
|Ignition state of the vehicle&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
// ... port of miniSim auxiliary UDP packets&lt;br /&gt;
var RT_MS_PORT_INCOMING = 8035;&lt;br /&gt;
var RT_MS_PORT_OUTGOING = 8036;&lt;br /&gt;
var RT_MS_IP = '192.168.0.105';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.&lt;br /&gt;
&lt;br /&gt;
Please [https://www.nads-sc.uiowa.edu/minisim/contact contact us] if you have any questions about extending the infotainment system for other forms of input.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
=== UDP ===&lt;br /&gt;
If enabled, the host script outputs a UDP stream to an IP and port defined in the '''infotainment_config.txt''' file in the root directory of the Infotainment System install. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;padding:20px; border:1px solid #CCC; margin:2em;&amp;quot;&amp;gt;&lt;br /&gt;
var RT_STREAM_ENABLED = true;&lt;br /&gt;
var RT_HOST_IP = '192.168.0.200';&lt;br /&gt;
var RT_PORT_OUTGOING = 8902;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).&lt;br /&gt;
&lt;br /&gt;
By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:2em;&amp;quot;&lt;br /&gt;
! Cell name&lt;br /&gt;
! Length, type&lt;br /&gt;
! Description&lt;br /&gt;
! Default value&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|The screen ID of the current active screen/menu of an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Button&lt;br /&gt;
|1 short&lt;br /&gt;
|The button ID of the last button pushed on an attached page/skin&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
|AUX_Info_Cursor&lt;br /&gt;
|2 shorts&lt;br /&gt;
|The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999&lt;br /&gt;
| -9999, -9999&lt;br /&gt;
|-&lt;br /&gt;
|AUX_MID_Screen&lt;br /&gt;
|1 short&lt;br /&gt;
|If using an attached multi-information display (MID), this variable returns the given &amp;quot;screen ID&amp;quot; of the MID. &lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.&lt;/div&gt;</summary>
		<author><name>Scable</name></author>	</entry>

	</feed>