Skip to content

Commit

Permalink
Merge pull request #1751 from smartdevicelink/release/4.4.0
Browse files Browse the repository at this point in the history
Release/4.4.0
  • Loading branch information
Jack-Byrne authored Oct 30, 2017
2 parents d094628 + 1049092 commit 70eec5c
Show file tree
Hide file tree
Showing 430 changed files with 36,384 additions and 32,095 deletions.
19 changes: 11 additions & 8 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@

Third party contributions are essential for making SDL great. However, we do have a few guidelines we need contributors to follow.

## Environment
Currently supported:
* Ubuntu Linux 14.04 with GCC 4.9.x
* Ubuntu Linux 16.04 with GCC 5.4.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)

### Issues
If writing a bug report, please make sure <a href="http://yourbugreportneedsmore.info" target="_blank">it has enough info</a>. Include all relevant information.
If writing a bug report, please make sure [you follow the issue template](https://github.com/smartdevicelink/sdl_core/blob/master/.github/ISSUE_TEMPLATE.md). Include all relevant information.

If requesting a feature, understand that we appreciate the input! However, it may not immediately fit our roadmap, and it may take a while for us to get to your request.

### Gitflow
We use <a href="http://nvie.com/posts/a-successful-git-branching-model/">Gitflow</a> as our branch management system. Please follow gitflow's guidelines while contributing to any SDL project.
We use [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/) as our branch management system. Please follow GitFlow's guidelines while contributing to any SDL project.

### Pull Requests
* Please follow the repository's for all code and documentation.
* Please follow the repository's [Style Guide](https://github.com/smartdevicelink/sdl_core/wiki/SDL-Coding-Style-Guide) for all code and documentation.
* All pull requests should be sent to `smartdevicelink/sdl_core/`, to `develop` or `master` branch.
* All feature branches should be based on `develop` and have the format `feature/branch_name`.
* All fix branches should be based on `develop` and have the format `fix/branch_name`.
* All new functionality requests should be provided only for `develop` branch.
* In case defect should be fixed in short time (after release), send pull request to `master` and have the format `hotfix/branch_name`.
* In case defect exists in `develop` and `master` branches, send pull request to `develop` only. Do not send the same pull request to the `master` branch.
* In case an issue should be fixed in a short time (after release), open a pull request to `master` with a branch name of `hotfix/branch_name`.
* In case an issue exists in both the `develop` and `master` branches, open a pull request to `develop` only. Do not open the same pull request against the `master` branch.
* All pull requests should implement a single feature or fix a single bug. Pull Requests that involve multiple changes (it is our discretion what precisely this means) will be rejected with a reason.
* All commits should be separated into logical units, i.e. unrelated changes should be in different commits within a pull request.
* Work in progress pull requests should have "[WIP]" in front of the Pull Request title. When you believe the pull request is ready to merge, remove this tag and @mention the appropriate SDL team to schedule a review.
Expand All @@ -30,6 +36,3 @@ In order to accept Pull Requests from contributors, you must first sign [the Con
## Additional Resources
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
* [Contributor's License Agreement](https://docs.google.com/forms/d/1VNR8EUd5b46cQ7uNbCq1fJmnu0askNpUp5dudLKRGpU/viewform)
* [Committers.md](https://github.com/LuxoftSDL/sdl_core/blob/feature/Add_Committers_file/COMMITTERS.md)

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Delete any non-applicable sections, but we may ask for more information.]

### Bug Report
[Summary]

##### Reproduction Steps
1. [Step 1]
2. [Step 2]
3. [Step 3]

##### Expected Behavior
[Some expected behavior]

##### Observed Behavior
[Some observed behavior]

##### OS & Version Information
* OS/Version: [The OS/Version you were running when the bug occurred]
* SDL Core Version: [The version of SDL Core you were using when the bug occurred]
* Testing Against: [What you tested with to observe this behavior. Proxy, App, HMI etc.]

##### Test Case, Sample Code, and / or Example App
[Paste a link to a PR, gist, or other code that exemplifies this behavior]
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[Things to note: Pull Requests **must** fix an issue. Discussion about the feature / bug takes place in the issue, discussion of the implementation takes place in the PR. Please also see the [Contributing Guide](https://github.com/smartdevicelink/sdl_core/blob/master/.github/CONTRIBUTING.md) for information on branch naming and the CLA.

Delete the above section when you've read it.]

Fixes #[issue number]

This PR is **[ready / not ready]** for review.

### Risk
This PR makes **[no / minor / major]** API changes.

### Testing Plan
[Describe how you plan to unit test the changes in this PR]

### Summary
[Summary of PR changes]

### Changelog
##### Breaking Changes
* [Breaking change info]

##### Enhancements
* [Enhancement info]

##### Bug Fixes
* [Bug Fix Info]

### Tasks Remaining:
- [ ] [Task 1]
- [ ] [Task 2]

### CLA
- [ ] I have signed [the CLA](https://docs.google.com/forms/d/e/1FAIpQLSdsgJY33VByaX482zHzi-xUm49JNnmuJOyAM6uegPQ2LXYVfA/viewform)
23 changes: 21 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ option(ENABLE_GCOV "gcov code coverage feature" OFF)
option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
option(ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" ON)
option(ENABLE_EXTENDED_POLICY "Turns extended flow which requires embedded system interaction" ON)
option(REMOTE_CONTROL "Enable Reverse functionality" ON)
option(USE_COTIRE "Use Cotire to speed up build (currently only for commands tests)" ON)
option(USE_GOLD_LD "Use gold linker intead of GNU linker" ON)
option(USE_CCACHE "Turn on ccache usage" ON)
option(USE_DISTCC "Turn on distributed build_usage" ON)
option(USE_DISTCC "Turn on distributed build_usage" OFF)

set (EXTENDED_POLICY "PROPRIETARY" CACHE STRING "Policy mode (PROPRIETARY, HTTP or EXTERNAL_PROPRIETARY)")
set_property(CACHE EXTENDED_POLICY PROPERTY STRINGS PROPRIETARY HTTP EXTERNAL_PROPRIETARY)
Expand Down Expand Up @@ -160,6 +160,11 @@ if (OS_TYPE_OPTION)
endif()
endif()

if (REMOTE_CONTROL)
add_definitions(-DSDL_REMOTE_CONTROL)
message(STATUS "Remote control support is enabled (aka Reverse SDL or SDL-RC)")
endif()

#Jenkins integration section end

add_custom_target(pasa-tarball
Expand Down Expand Up @@ -282,6 +287,8 @@ if(ENABLE_LOG)
message(STATUS "Logger enabled")
endif()

set(install-bson_c_lib "install-bson_c_lib")

if (TELEMETRY_MONITOR)
add_definitions(-DTELEMETRY_MONITOR)
message(STATUS "Telemetry monitor enabled")
Expand Down Expand Up @@ -407,6 +414,18 @@ if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
set(RTLIB )
endif()

SET(RPATH_DIRECTORIES
${CMAKE_INSTALL_PREFIX}/bin/plugins
/usr/local/lib
/usr/local
${CMAKE_INSTALL_PREFIX}/bin
)
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${RPATH_DIRECTORIES}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)


# Building tests
if(BUILD_TESTS)
enable_testing()
Expand Down
95 changes: 0 additions & 95 deletions COMMITTERS.md

This file was deleted.

52 changes: 1 addition & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)

[![Build Status](https://travis-ci.org/smartdevicelink/sdl_core.svg?branch=master)](https://travis-ci.org/smartdevicelink/sdl_core)

[![codecov.io](https://codecov.io/github/smartdevicelink/sdl_core/coverage.svg?branch=develop)](https://codecov.io/github/smartdevicelink/sdl_core?branch=develop)
[![codecov.io](https://codecov.io/github/smartdevicelink/sdl_core/coverage.svg?branch=develop)](https://codecov.io/github/smartdevicelink/sdl_core?branch=develop)

# SmartDeviceLink (SDL)

Expand Down Expand Up @@ -121,54 +119,6 @@ There are several RPCs that are "required" to be implemented in order for SDL to
* OnSystemRequest
* Speak

## App Launching

Below are instructions for testing app launching and query with a full system set up.

### SDL Server
The app querying specification defines an endpoint within Policies where sdl_core will reach out to receive a list of applications that can be launched. The SDL Server provides the back end functionality for app launching and querying.

You can find the SDL Server on [GitHub](https://github.com/smartdevicelink/sdl_server). The README contains detailed instructions for installing and launching the server. Launch the server on your local machine, and direct your browser to http://localhost:3000.

The [App Launching Server Specification](https://github.com/smartdevicelink/sdl_server/blob/master/docs/application_launching_v1.0.md) defines an endpoint `/applications/available/:moduleId.json` which return a list of applications available for launching to the handset for filtering.

To check if there is a module already available you can go to http://localhost:3000/modules.json. If there is a module available, there will be one or more objects in the response array. Keep this response, you'll need the "_id" field for later.

If there is not a module already available, go to http://localhost:3000/cars and define a new vehicle, then check http://localhost:3000/modules.json.

Next, you'll need to define applications that can be launched. Go to http://localhost:3000/apps and define some applications. Make sure that you define a url scheme under the iOS tab of the application. This is required for an application to be launched from SDL. A URL scheme has the format `someScheme://`. Save the URL Scheme you used for later steps.

You'll also need the local ip address of your machine

At the end of the SDL Server set up you should have
1. SDL Server running on your local machine connected to mongo db
2. Your machine's local IP Address
3. The module id of your vehicle
4. The URL Scheme of the app you want to launch

### Mobile
You need at least one app installed on the test device (presumably an iPhone), which we have built for you, the [V4Tester application](https://app.box.com/s/eeloquc0fhqfmxjjubw7kousf12f3pzg). This application implements SDL 4.0 and will respond to SDL Core's QUERY_APPS system request, as well as filter the response for available applications. If you do not have any other applications on the device, you can only test QUERY_APPS functionality, in which no applications will be sent to sdl core which can be launched.

In order to support the launching of an application, you'll have to create an additional app which responds to the URL Scheme of the application that you set up on the SDL Server. To do so, go to Xcode, select File>New>Project... and under ios/application create a Single View Application. Open the application's Info.plist file (under the Supporting Files section of the project explorer by default). Highlight the Information Property List item and click the plus button to add a new entry to the Property List. From the drop down menu, select URL Types as the key. In the Item 0 dictionary add a "URL Schemes" Array, and make Item 0 in the array the prefix to the URL you previously defined (So if you defined `someScheme://` then Item 0 should be "someScheme"). Make sure the URL identifier matches your application's identifier. When you're finished you should have something that looks like the following. Install this application on your test device. **Note** - this application will only launch during this process, since it is not SDL Connected it will not register with the head unit.

![Plist Example](http://i.imgur.com/AFyJlZQ.png)

At the end of the Mobile device set up you should have
1. The V4 Tester Application installed on your device
2. An application for launching that matches the application submitted to SDL Server
3. Your iPhone should be on the same network as the machine running SDL Server

### SDL Core
Take the following steps to launch applications from sdl core.

1. Install the [correct version of SDL Core](https://github.com/smartdevicelink/sdl_core/pull/39)
2. Add the queryAppsUrl that you saved during sdl server set up in the src/appMain/preloaded_pt.json under the "endpoints" property in the format `http://[local machine ip]:3000/applications/available[moduleId].json`. For example `http://192.168.0.150:3000/applications/available/789b739c47c7490321058200.json`.
3. Run SDL Core
4. Launch the V4 Tester application on the iPhone
5. Connect the application via wifi by entering the IP address of Core into the V4 tester
6. Both applications should show up on the head unit for launching
7. Select the other application, and you should see it launched and brought to the foreground on the phone

## Test Coverage
### Used technologies
* GCOV - test coverage program.
Expand Down
12 changes: 6 additions & 6 deletions src/3rd_party-static/message_broker/src/client/mb_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "mb_controller.hpp"

#include "MBDebugHelper.h"
#include "MBDebugHelper.h"
#include "CMessageBroker.hpp"

namespace NsMessageBroker
Expand Down Expand Up @@ -45,7 +45,7 @@ namespace NsMessageBroker
return recv;
}
std::string wmes = m_receiverWriter.write(root);
DBG_MSG(("Parsed JSON string:%s; length: %d\n", wmes.c_str(), wmes.length()));
DBG_MSG(("Parsed JSON string:%s; length: %zu\n", wmes.c_str(), wmes.length()));
DBG_MSG(("Buffer is:%s\n", m_receivingBuffer.c_str()));
ssize_t beginpos = m_receivingBuffer.find(wmes);
if (-1 != beginpos)
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace NsMessageBroker
}
int bytesSent = Send(mes);
bytesSent = bytesSent; // to prevent compiler warnings in case DBG_MSG off
DBG_MSG(("Length:%d, Sent: %d bytes\n", mes.length(), bytesSent));
DBG_MSG(("Length: %zu, Sent: %d bytes\n", mes.length(), bytesSent));
}

std::string CMessageBrokerController::findMethodById(std::string id)
Expand Down Expand Up @@ -153,7 +153,7 @@ namespace NsMessageBroker
return mControllersIdCurrent = mControllersIdStart;
}
}

void CMessageBrokerController::prepareMessage(Json::Value& root)
{
root["jsonrpc"] = "2.0";
Expand Down Expand Up @@ -286,11 +286,11 @@ namespace NsMessageBroker
{
DBG_MSG(("CMessageBrokerController::checkMessage()\n"));
Json::Value err;

try
{
/* check the JSON-RPC version => 2.0 */
if (!root.isObject() || !root.isMember("jsonrpc") || root["jsonrpc"] != "2.0")
if (!root.isObject() || !root.isMember("jsonrpc") || root["jsonrpc"] != "2.0")
{
error["id"] = Json::Value::null;
error["jsonrpc"] = "2.0";
Expand Down
Loading

0 comments on commit 70eec5c

Please sign in to comment.