Skip to content

Commit

Permalink
Merge pull request #119 from smartdevicelink/develop
Browse files Browse the repository at this point in the history
Documentation For Core Release 7.1.0
  • Loading branch information
jacobkeeler authored Apr 14, 2021
2 parents e9c7ce4 + c1d69c0 commit d87a799
Show file tree
Hide file tree
Showing 17 changed files with 391 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
3 changes: 3 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
"navigation": [
{
"name": "Migrating SDL Core 6.1 to 7.0"
},
{
"name": "Migrating SDL Core 7.0 to 7.1"
}
]
},
Expand Down
6 changes: 4 additions & 2 deletions docs/Developer Documentation/ResumeController/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ Main public function for resumptions is `ResumptionDataProcessor::Restore` :
```cpp
/**
* @brief Running resumption data process from saved_app to application.
* @param application application which will be resumed
* @param saved_app application specific section from backup file
* @param application Application which will be resumed
* @param saved_app Application specific section from backup file
* @param callback Function signature to be called when
* data resumption will be finished
*/
void Restore(app_mngr::ApplicationSharedPtr application,
smart_objects::SmartObject& saved_app,
Expand Down
8 changes: 4 additions & 4 deletions docs/Developer Documentation/Transport Manager/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ UML Refresher

## Transport Adapter

Each Transport Adapter is responsible for one specific type of connection, such as TCP or Bluetooth. Similar to Transport Managers, other components in Core are able to register a Transport Adapter Listener with a Transport Adapter to later receive events from the Adapter such as `OnConnectDone`. The Transport Adapter will contain the code to connect and disconnect devices, as well as send and receive data. Depending on the transport type, a transport adapter may implement sub-components, called workers, such as a Device Scanner, a Client Connection Listener, or a Server Connection Factory. Currently, Transport Adapters are registered with the Transport Manager within the [TransportManagerDefault::Init](https://github.com/smartdevicelink/sdl_core/blob/develop/src/components/transport_manager/src/transport_manager_default.cc#105) method; you can add code here to include your custom Transport Adapter. Depending on your implementation, most of the functionality of the Transport Adapter will likely live in the workers. Two big functions that will for sure need to be implemented in a Transport Adapter are Store() and Restore() which are used to save and resume the state of the Adapter when there is an unexpected disconnect or SDL Core is restarted. In the case of the [TCP Transport Adapter](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc), the Store() function will save a list of devices' names and addresses, along with the applications each device was running and their corresponding port number. When resuming, Restore() will reconnect to the devices saved in the last state and resumes communication with the the applications on each device.
Each Transport Adapter is responsible for one specific type of connection, such as TCP or Bluetooth. Similar to Transport Managers, other components in Core are able to register a Transport Adapter Listener with a Transport Adapter to later receive events from the Adapter such as `OnConnectDone`. The Transport Adapter will contain the code to connect and disconnect devices, as well as send and receive data. Depending on the transport type, a transport adapter may implement sub-components, called workers, such as a Device Scanner, a Client Connection Listener, or a Server Connection Factory. Currently, Transport Adapters are registered with the Transport Manager within the [TransportManagerDefault::Init](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/transport_manager/src/transport_manager_default.cc#L105) method; you can add code here to include your custom Transport Adapter. Depending on your implementation, most of the functionality of the Transport Adapter will likely live in the workers. Two big functions that will for sure need to be implemented in a Transport Adapter are Store() and Restore() which are used to save and resume the state of the Adapter when there is an unexpected disconnect or SDL Core is restarted. In the case of the [TCP Transport Adapter](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc), the Store() function will save a list of devices' names and addresses, along with the applications each device was running and their corresponding port number. When resuming, Restore() will reconnect to the devices saved in the last state and resumes communication with the applications on each device.

```
// tcp_transport_adapter.cc
Expand Down Expand Up @@ -323,7 +323,7 @@ Connection Close Command

### Core as the Server

Creating a connection with Core acting as the server means that the connection is initiated by a device trying to connect to Core. In the case of the TCP Transport Adapter, this all begins with a device connecting to Core on port 12345. The TCP Connection Listener's loop waits for a new connection to it's socket before adding that device to the device list (if it doesn't already exist) and adding the new application to the app list. Once the application has registered and the HMI has received the updated app list, selecting the TCP application in the HMI shall prompt it to activate.
Creating a connection with Core acting as the server means that the connection is initiated by a device trying to connect to Core. In the case of the TCP Transport Adapter, this all begins with a device connecting to Core on port 12345. The TCP Connection Listener's loop waits for a new connection to its socket before adding that device to the device list (if it doesn't already exist) and adding the new application to the app list. Once the application has registered and the HMI has received the updated app list, selecting the TCP application in the HMI shall prompt it to activate.

### Core as the Client

Expand All @@ -337,7 +337,7 @@ Sending data to a device is initiated by the `SendMessageToMobile` method on the

### Receiving

The code to receive data will vary depending on the method of transport; in the case of the TCP Transport Adapter, the Socket Connection thread loops checking if data bas been sent to it's socket before calling `recv` and converting the read buffer to a raw message. When a Transport Adapter finishes receiving incoming message(s) it will emit the event OnReceivedDone. This event will be propagated to the Transport Manager Listeners including the Protocol Handler who will add the message(s) to the _messages from mobile_ queue which is processed by another thread within the Protocol Handler.
The code to receive data will vary depending on the method of transport; in the case of the TCP Transport Adapter, the Socket Connection thread loops checking if data has been sent to its socket before calling `recv` and converting the read buffer to a raw message. When a Transport Adapter finishes receiving incoming message(s) it will emit the event OnReceivedDone. This event will be propagated to the Transport Manager Listeners including the Protocol Handler who will add the message(s) to the _messages from mobile_ queue which is processed by another thread within the Protocol Handler.

## Events

Expand Down Expand Up @@ -371,7 +371,7 @@ Indicates that disconnecting from an application has completed and prompts the T

**OnSendDone**

Indicates that a Transport Adapter has finished sending the messages in it's queue. Upon receipt of this event the Transport Manager will check if the connection is slated for shutdown and disconnect it if so.
Indicates that a Transport Adapter has finished sending the messages in its queue. Upon receipt of this event the Transport Manager will check if the connection is slated for shutdown and disconnect it if so.

**OnSendFail**

Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here are a few of the most common questions new developers have around the SDL Core project.

## What OS should I use to get started?
Currently the SDL Core repo is built for Ubuntu 18.04 as our default environment.
Currently the SDL Core repo is built for Ubuntu 20.04 as our default environment.

## I'm getting a lot of compilation errors, how do I get past them?
The most common errors come from dependencies issues. Ensure your system has all the required packages to compile the project. Try running the commands in the [dependencies section](../getting-started/install-and-run/#dependencies) of the Getting Started guide.
Expand Down
25 changes: 11 additions & 14 deletions docs/Feature Documentation/Audio and Video Streaming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,18 @@ Before continuing, follow the [Install and Run Guide](../../getting-started/inst

### HMI Setup

The Generic HMI does not currently support streaming.
The [Generic HMI](https://github.com/smartdevicelink/generic_hmi) and [SDL HMI](https://github.com/smartdevicelink/sdl_hmi) both support streaming audio and some video formats in the browser using ffmpeg to transcode the video to VP8 WEBM or audio to WAV. Instructions to install the required dependencies can be found in the HMI README:

If using the [SDL HMI](https://github.com/smartdevicelink/sdl_hmi), you may need to make the following modifications when using socket streaming.
- [SDL HMI Dependencies](https://github.com/smartdevicelink/sdl_hmi/tree/master#dependencies)
- [Generic HMI Dependencies](https://github.com/smartdevicelink/generic_hmi/tree/master#dependencies)

#### VIDEO
In order to stream video, comment out the following line in `app/model/sdl/Abstract/Model.js`:
```
// SDL.SDLModel.playVideo(appID);
```
In the HMI directory, you will need to run the backend server component (`./deploy_server.sh`) which handles the transcoding.

#### AUDIO
In order to stream audio, comment out the following lines in `app/model/sdl/Abstract/Model.js`:
```
// SDL.StreamAudio.play(
// SDL.SDLController.getApplicationModel(appID).navigationAudioStream
// );
```
!!! NOTE
Once you start a video stream it will take a few seconds for the transcoding session to begin. Your video stream should appear in the browser within about 10 seconds.
!!!

To stream without ffmpeg transcoding, or to stream a format that ffmpeg does not support, you can forgo starting the backend server and use gstreamer to consume your audio/video stream.

### GSTREAMER Setup

Expand Down Expand Up @@ -108,11 +103,13 @@ gst-launch-1.0 souphttpsrc location=http://127.0.0.1:5080 ! audio/x-raw,format=S
This section describes how Core manages the streaming states of mobile applications. Only one application may stream video at a time, but audio applications may stream while in the LIMITED state with other applications.

When an app is moved to HMI level `FULL`:

* All non-streaming applications go to HMI level `BACKGROUND`
* All apps with the same App HMI Type go to `BACKGROUND`
* Streaming apps with a different App HMI Type that were in `FULL` go to `LIMITED`

When an app is moved to HMI level `LIMITED`:

* All non-streaming applications keep their HMI level
* All applications with a different App HMI Type keep their HMI level
* Applications with the same App HMI Type go to `BACKGROUND`
Expand Down
2 changes: 1 addition & 1 deletion docs/Feature Documentation/Remote Control/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ The light module does not contain any sub-modules but instead has an array of `L

### HMI Settings

The HMI settings module does not contain any sub-modules and is represented by an `HMISettingsControlCapabilities` object. This module exposes the the ability to set the desired temperature and distance units as well as toggle the display mode of the HMI between night and day.
The HMI settings module does not contain any sub-modules and is represented by an `HMISettingsControlCapabilities` object. This module exposes the ability to set the desired temperature and distance units as well as toggle the display mode of the HMI between night and day.

### Button

Expand Down
2 changes: 1 addition & 1 deletion docs/Feature Documentation/Smart Objects/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In order to create a new Schema (a new object of class `ns_smart_device_link::ns

Schema Items are represented as class hierarchy. The base class for all Schema Items is the `ns_smart_device_link::ns_smart_objects::ISchemaItem` class. This base class defines a generic validation interface for all Schema Items.

- To define special elements which always fail or suceed the validation step, there are two special Schema Items: `ns_smart_device_link::ns_smart_objects::CAlwaysTrueSchemaItem` or `ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem`.
- To define special elements which always fail or succeed the validation step, there are two special Schema Items: `ns_smart_device_link::ns_smart_objects::CAlwaysTrueSchemaItem` or `ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem`.

- `ns_smart_device_link::ns_smart_objects::CBoolSchemaItem` is used for boolean values and has no parameters, meaning that it only verifies that the Smart Object contains an actual boolean value.

Expand Down
4 changes: 2 additions & 2 deletions docs/Getting Started/Install and Run/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Installation
A quick guide to installing, configuring, and running an instance of SDL Core on a Linux OS (default environment is Ubuntu 18.04 LTS).
A quick guide to installing, configuring, and running an instance of SDL Core on a Linux OS (default environment is Ubuntu 20.04 LTS).

## Dependencies
The dependencies for SDL Core vary based on the configuration. You can change SDL Core's build configuration in the top level CMakeLists.txt. We have defaulted this file to a configuration which we believe is common for people who are interested in getting up and running quickly, generally on a Linux VM.

The default dependencies for SDL Core can be installed with the following command:

```bash
sudo apt-get install git cmake build-essential sqlite3 libsqlite3-dev libssl1.0-dev libssl1.0.0 libusb-1.0-0-dev libudev-dev libgtest-dev libbluetooth3 libbluetooth-dev bluez-tools libpulse-dev python3-pip python3-setuptools
sudo apt-get install git cmake build-essential sqlite3 libsqlite3-dev libssl-dev libssl1.1 libusb-1.0-0-dev libudev-dev libgtest-dev libbluetooth3 libbluetooth-dev bluez-tools libpulse-dev python3-pip python3-setuptools python
```

### Clone SDL Core and Submodules
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d87a799

Please sign in to comment.