diff --git a/NOTICE-3RD-PARTY-CONTENT.md b/NOTICE-3RD-PARTY-CONTENT.md
index 8f76972c..7547ecc4 100644
--- a/NOTICE-3RD-PARTY-CONTENT.md
+++ b/NOTICE-3RD-PARTY-CONTENT.md
@@ -4,18 +4,18 @@
| Dependency | Version | License |
|:-----------|:-------:|--------:|
|bottle|0.12.25|MIT|
-|certifi|2023.5.7|Mozilla Public License 2.0|
-|cfgv|3.3.1|MIT|
-|charset-normalizer|3.1.0|MIT|
+|certifi|2023.7.22|Mozilla Public License 2.0|
+|cfgv|3.4.0|MIT|
+|charset-normalizer|3.2.0|MIT|
|colorama|0.4.6|BSD|
|conan|1.58.0|MIT|
|cpplint|1.6.1|New BSD|
-|distlib|0.3.6|Python Software Foundation License|
+|distlib|0.3.7|Python Software Foundation License|
|distro|1.7.0|Apache 2.0|
|fasteners|0.18|Apache 2.0|
|filelock|3.12.2|The Unlicense (Unlicense)|
|gcovr|5.2|BSD|
-|identify|2.5.24|MIT|
+|identify|2.5.26|MIT|
|idna|3.4|BSD|
|Jinja2|3.1.2|New BSD|
|lxml|4.9.3|New BSD|
@@ -23,20 +23,20 @@
|node-semver|0.6.1|MIT|
|nodeenv|1.8.0|BSD|
|patch-ng|1.17.4|MIT|
-|platformdirs|3.8.1|MIT|
+|platformdirs|3.10.0|MIT|
|pluginbase|1.0.1|BSD|
|pre-commit|2.20.0|MIT|
-|Pygments|2.15.1|Simplified BSD|
-|PyJWT|2.7.0|MIT|
+|Pygments|2.16.1|Simplified BSD|
+|PyJWT|2.8.0|MIT|
|python-dateutil|2.8.2|Apache 2.0
BSD|
|PyYAML|6.0|MIT|
|requests|2.31.0|Apache 2.0|
|setuptools|58.1.0|MIT|
|six|1.16.0|MIT|
|toml|0.10.2|MIT|
-|tqdm|4.65.0|MIT
Mozilla Public License 2.0 (MPL 2.0)|
+|tqdm|4.66.1|MIT
Mozilla Public License 2.0 (MPL 2.0)|
|urllib3|1.26.16|MIT|
-|virtualenv|20.23.1|MIT|
+|virtualenv|20.24.3|MIT|
## Workflows
| Dependency | Version | License |
|:-----------|:-------:|--------:|
diff --git a/examples/seat-adjuster/AppManifest.json b/examples/seat-adjuster/AppManifest.json
index d6e65228..59e57578 100644
--- a/examples/seat-adjuster/AppManifest.json
+++ b/examples/seat-adjuster/AppManifest.json
@@ -1,26 +1,34 @@
-[
- {
- "name": "seatadjuster",
- "vehicleModel": {
- "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
- "datapoints": [
- {
- "path": "Vehicle.Cabin.Seat.Row1.Pos1.Position",
- "required": "true",
- "access": "read"
- },
- {
- "path": "Vehicle.Speed",
- "required": "true",
- "access": "read"
+{
+ "manifestVersion": "v3",
+ "name": "seatadjuster",
+ "interfaces": [
+ {
+ "type": "vehicle-signal-interface",
+ "config": {
+ "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
+ "datapoints": {
+ "required": [
+ {
+ "path": "Vehicle.Cabin.Seat.Row1.Pos1.Position",
+ "access": "read"
+ },
+ {
+ "path": "Vehicle.Speed",
+ "access": "read"
+ }
+ ]
}
- ]
+ }
},
- "runtime": [
- "grpc://sdv.databroker.v1.Broker/GetDatapoints",
- "grpc://sdv.databroker.v1.Broker/Subscribe",
- "grpc://sdv.edge.comfort.seats.v1.Seats/MoveComponent",
- "mqtt"
- ]
- }
-]
+ {
+ "type": "pubsub",
+ "config": {
+ "reads": [ "seatadjuster/setPosition/request" ],
+ "writes": [
+ "seatadjuster/setPosition/response",
+ "seatadjuster/currentPosition"
+ ]
+ }
+ }
+ ]
+}
diff --git a/examples/seat-adjuster/src/SeatAdjusterApp.cpp b/examples/seat-adjuster/src/SeatAdjusterApp.cpp
index ca5696a5..e0b7e629 100644
--- a/examples/seat-adjuster/src/SeatAdjusterApp.cpp
+++ b/examples/seat-adjuster/src/SeatAdjusterApp.cpp
@@ -52,11 +52,6 @@ void SeatAdjusterApp::onStart() {
->onError(
[this](auto&& status) { onErrorDatapoint(std::forward(status)); });
- // TODO: Do we need some kind of functionality to ensure that the Model
- // in the VDB is actually the same as the one we are using? i.e. does it
- // have the data points we are expecting???
- // m_vehicleModel->verify();
-
subscribeToTopic(TOPIC_REQUEST)
->onItem([this](auto&& item) {
onSetPositionRequestReceived(std::forward(item));
@@ -64,18 +59,6 @@ void SeatAdjusterApp::onStart() {
->onError([this](auto&& status) { onErrorTopic(std::forward(status)); });
}
-void SeatAdjusterApp::onSeatMovementRequested(const velocitas::VoidResult& status, int requestId,
- float requestedPosition) {
- velocitas::logger().info("Seat movement request processed...");
-
- nlohmann::json respData(
- {{JSON_FIELD_REQUEST_ID, requestId},
- {JSON_FIELD_RESULT,
- {{JSON_FIELD_MESSAGE, fmt::format("Called MoveComponent {}", requestedPosition)},
- {JSON_FIELD_STATUS, STATUS_OK}}}});
- publishToTopic(TOPIC_RESPONSE, respData.dump());
-}
-
void SeatAdjusterApp::onSetPositionRequestReceived(const std::string& data) {
velocitas::logger().debug("position request: \"{}\"", data);
const auto jsonData = nlohmann::json::parse(data);
@@ -93,46 +76,40 @@ void SeatAdjusterApp::onSetPositionRequestReceived(const std::string& data) {
const auto desiredSeatPosition = jsonData[JSON_FIELD_POSITION].get();
const auto requestId = jsonData[JSON_FIELD_REQUEST_ID].get();
- const auto vehicleSpeed = m_vehicleModel->Speed.get()->await().value();
+ nlohmann::json respData({{JSON_FIELD_REQUEST_ID, requestId}, {JSON_FIELD_RESULT, {}}});
+ const auto vehicleSpeed = m_vehicleModel->Speed.get()->await().value();
if (vehicleSpeed == 0) {
- velocitas::vehicle::cabin::SeatService::SeatLocation location{1, 1};
- m_vehicleModel->Cabin.SeatService
- .moveComponent(location, velocitas::vehicle::cabin::SeatService::Component::Base,
- desiredSeatPosition)
- ->onResult([this, requestId, desiredSeatPosition](auto&& result) {
- onSeatMovementRequested(std::forward(result), requestId,
- desiredSeatPosition);
- })
- ->onError([this](auto&& status) { onError(std::forward(status)); });
+ m_vehicleModel->Cabin.Seat.Row1.Pos1.Position.set(desiredSeatPosition)->await();
+
+ respData[JSON_FIELD_RESULT][JSON_FIELD_STATUS] = STATUS_OK;
+ respData[JSON_FIELD_RESULT][JSON_FIELD_MESSAGE] =
+ fmt::format("Set Seat position to: {}", desiredSeatPosition);
} else {
const auto errorMsg = fmt::format(
"Not allowed to move seat because vehicle speed is {} and not 0", vehicleSpeed);
velocitas::logger().info(errorMsg);
- nlohmann::json respData(
- {{JSON_FIELD_REQUEST_ID, requestId},
- {JSON_FIELD_RESULT,
- {{JSON_FIELD_STATUS, STATUS_FAIL}, {JSON_FIELD_MESSAGE, errorMsg}}}});
- publishToTopic(TOPIC_RESPONSE, respData.dump());
+ respData[JSON_FIELD_RESULT][JSON_FIELD_STATUS] = STATUS_FAIL;
+ respData[JSON_FIELD_RESULT][JSON_FIELD_MESSAGE] = errorMsg;
}
+
+ publishToTopic(TOPIC_RESPONSE, respData.dump());
}
void SeatAdjusterApp::onSeatPositionChanged(const velocitas::DataPointReply& dataPoints) {
- const auto seatPositionValue =
- dataPoints.get(m_vehicleModel->Cabin.Seat.Row1.Pos1.Position)->value();
-
+ nlohmann::json jsonResponse;
try {
- nlohmann::json jsonResponse({JSON_FIELD_POSITION, seatPositionValue});
-
- publishToTopic(TOPIC_CURRENT_POSITION, jsonResponse.dump());
+ const auto seatPositionValue =
+ dataPoints.get(m_vehicleModel->Cabin.Seat.Row1.Pos1.Position)->value();
+ jsonResponse[JSON_FIELD_POSITION] = seatPositionValue;
} catch (std::exception& exception) {
velocitas::logger().error("Unable to get Current Seat Position, Exception: {}",
exception.what());
- nlohmann::json jsonResponse(
- {{JSON_FIELD_STATUS, STATUS_FAIL}, {JSON_FIELD_MESSAGE, exception.what()}});
-
- publishToTopic(TOPIC_CURRENT_POSITION, jsonResponse.dump());
+ jsonResponse[JSON_FIELD_STATUS] = STATUS_FAIL;
+ jsonResponse[JSON_FIELD_MESSAGE] = exception.what();
}
+
+ publishToTopic(TOPIC_CURRENT_POSITION, jsonResponse.dump());
}
void SeatAdjusterApp::onError(const velocitas::Status& status) {
diff --git a/examples/set-data-points/AppManifest.json b/examples/set-data-points/AppManifest.json
index 45d73edc..339e4a4e 100644
--- a/examples/set-data-points/AppManifest.json
+++ b/examples/set-data-points/AppManifest.json
@@ -1,29 +1,28 @@
-[
- {
- "name": "set-data-points",
- "vehicleModel": {
- "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
- "datapoints": [
- {
- "path": "Vehicle.Cabin.Seat.Row1.Pos1.Position",
- "required": "true",
- "access": "write"
- },
- {
- "path": "Vehicle.Cabin.Seat.Row1.Pos2.Position",
- "required": "true",
- "access": "write"
- },
- {
- "path": "Vehicle.Speed",
- "required": "true",
- "access": "write"
+{
+ "manifestVersion": "v3",
+ "name": "set-data-points",
+ "interfaces": [
+ {
+ "type": "vehicle-signal-interface",
+ "config": {
+ "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
+ "datapoints": {
+ "required": [
+ {
+ "path": "Vehicle.Cabin.Seat.Row1.Pos1.Position",
+ "access": "write"
+ },
+ {
+ "path": "Vehicle.Cabin.Seat.Row1.Pos2.Position",
+ "access": "write"
+ },
+ {
+ "path": "Vehicle.Speed",
+ "access": "write"
+ }
+ ]
}
- ]
- },
- "runtime": [
- "grpc://sdv.databroker.v1.Broker/GetDatapoints",
- "grpc://sdv.databroker.v1.Broker/SetDatapoints"
- ]
- }
-]
+ }
+ }
+ ]
+}
diff --git a/install_dependencies.sh b/install_dependencies.sh
index 83fbbd07..24664e45 100755
--- a/install_dependencies.sh
+++ b/install_dependencies.sh
@@ -113,7 +113,7 @@ fi
# Enable Conan revision handling to enable pinning googleapis recipe revision (see conanfile.py)
export CONAN_REVISIONS_ENABLED=1
-conan install \
+conan install --update \
-pr:h ../.conan/profiles/linux_${HOST_ARCH}_${BUILD_VARIANT} \
${XCOMPILE_PROFILE} \
--build "${WHICH_DEPS_TO_BUILD}" ..