Skip to content

Commit

Permalink
vsomeip 3.3.6 (COVESA#455)
Browse files Browse the repository at this point in the history
Notes:
- The "last forwarded" timestamp must be handled per event
- Fix deadlock
- Restart the connection on broken unix sockets
- Fix routing root not binding to local tcp if
- Rework connecting timeout
  • Loading branch information
DiogoPedrozza authored Jun 5, 2023
1 parent 80716c6 commit ebb5312
Show file tree
Hide file tree
Showing 69 changed files with 346 additions and 327 deletions.
2 changes: 1 addition & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cc_library_shared {

cflags: [
"-DWITHOUT_SYSTEMD",
"-DVSOMEIP_COMPAT_VERSION=\"3.3.5\"",
"-DVSOMEIP_COMPAT_VERSION=\"3.3.6\"",
"-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\"",
"-DUSE_DLT",
],
Expand Down
8 changes: 4 additions & 4 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.5\" \
-DVSOMEIP_VERSION=\"3.3.6\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -147,7 +147,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.5\" \
-DVSOMEIP_VERSION=\"3.3.6\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -194,8 +194,8 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.5\" \
-DVSOMEIP_COMPAT_VERSION=\"3.3.5\" \
-DVSOMEIP_VERSION=\"3.3.6\" \
-DVSOMEIP_COMPAT_VERSION=\"3.3.6\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changes
=======

v3.3.6
- The "last forwarded" timestamp must be handled per event
- Fix deadlock
- Restart the connection on broken unix sockets
- Fix routing root not binding to local tcp if
- Rework connecting timeout

v3.3.5.1
- Fix typo in application_impl.cpp
- Update load_balancing_option_impl.cpp
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set (VSOMEIP_COMPAT_NAME vsomeip)

set (VSOMEIP_MAJOR_VERSION 3)
set (VSOMEIP_MINOR_VERSION 3)
set (VSOMEIP_PATCH_VERSION 5)
set (VSOMEIP_PATCH_VERSION 6)
set (VSOMEIP_HOTFIX_VERSION 0)

set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
#include <vsomeip/primitive_types.hpp>
#include <vsomeip/plugin.hpp>

#ifdef ANDROID
#include "internal_android.hpp"
#else
#include "internal.hpp"
#endif
#include "debounce_filter_impl.hpp"

namespace vsomeip_v3 {

struct debounce_filter_t;

namespace cfg {

struct application_configuration {
Expand Down
16 changes: 8 additions & 8 deletions implementation/configuration/include/configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
namespace vsomeip_v3 {

class event;
struct debounce_filter_t;
struct debounce_filter_impl_t;

class configuration {
public:
Expand Down Expand Up @@ -212,18 +212,18 @@ class configuration {
virtual uint32_t get_log_status_interval() const = 0;

// TTL factor
using ttl_factor_t = std::uint32_t;
using ttl_map_t = std::map<service_t, std::map<instance_t, ttl_factor_t>>;
typedef std::uint32_t ttl_factor_t;
typedef std::map<service_t, std::map<instance_t, ttl_factor_t>> ttl_map_t;
virtual ttl_map_t get_ttl_factor_offers() const = 0;
virtual ttl_map_t get_ttl_factor_subscribes() const = 0;

// Debouncing
virtual std::shared_ptr<debounce_filter_t> get_debounce(
virtual std::shared_ptr<debounce_filter_impl_t> get_debounce(
const std::string &_name,
service_t _service, instance_t _instance, event_t _event) const = 0;

// Queue size limit endpoints
using endpoint_queue_limit_t = std::uint32_t;
typedef std::uint32_t endpoint_queue_limit_t;
virtual endpoint_queue_limit_t get_endpoint_queue_limit(
const std::string& _address, std::uint16_t _port) const = 0;
virtual endpoint_queue_limit_t get_endpoint_queue_limit_local() const = 0;
Expand All @@ -241,13 +241,13 @@ class configuration {
const boost::asio::ip::address& _address, std::uint16_t _port,
bool _reliable) const = 0;

using port_range_t = std::pair<std::uint16_t, std::uint16_t>;
typedef std::pair<std::uint16_t, std::uint16_t> port_range_t;
virtual void set_sd_acceptance_rule(
const boost::asio::ip::address &_address,
port_range_t _port_range, port_type_e _type,
const std::string &_path, bool _reliable, bool _enable, bool _default) = 0;

using sd_acceptance_rules_t = std::map<
typedef std::map<
boost::asio::ip::address, // other device
std::pair<
std::string, // path to file that determines whether or not IPsec is active
Expand All @@ -259,7 +259,7 @@ class configuration {
>
>
>
>;
> sd_acceptance_rules_t;
virtual sd_acceptance_rules_t get_sd_acceptance_rules() = 0;
virtual void set_sd_acceptance_rules_active(
const boost::asio::ip::address& _address, bool _enable) = 0;
Expand Down
8 changes: 3 additions & 5 deletions implementation/configuration/include/configuration_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

namespace vsomeip_v3 {

struct debounce_filter_t;

namespace cfg {

struct client;
Expand Down Expand Up @@ -204,7 +202,7 @@ class configuration_impl:
VSOMEIP_EXPORT ttl_map_t get_ttl_factor_offers() const;
VSOMEIP_EXPORT ttl_map_t get_ttl_factor_subscribes() const;

VSOMEIP_EXPORT std::shared_ptr<debounce_filter_t> get_debounce(
VSOMEIP_EXPORT std::shared_ptr<debounce_filter_impl_t> get_debounce(
const std::string &_name,
service_t _service, instance_t _instance, event_t _event) const;

Expand Down Expand Up @@ -373,9 +371,9 @@ class configuration_impl:
void load_service_debounce(const boost::property_tree::ptree &_tree,
debounce_configuration_t &_debounces);
void load_events_debounce(const boost::property_tree::ptree &_tree,
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces);
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces);
void load_event_debounce(const boost::property_tree::ptree &_tree,
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces);
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces);
void load_event_debounce_ignore(const boost::property_tree::ptree &_tree,
std::map<std::size_t, byte_t> &_ignore);
void load_acceptances(const configuration_element &_element);
Expand Down
39 changes: 0 additions & 39 deletions implementation/configuration/include/debounce.hpp

This file was deleted.

36 changes: 36 additions & 0 deletions implementation/configuration/include/debounce_filter_impl.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (C) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef VSOMEIP_V3_DEBOUNCE_HPP
#define VSOMEIP_V3_DEBOUNCE_HPP

#include <vsomeip/structured_types.hpp>

namespace vsomeip_v3 {

// Additionally store the last forwarded timestamp to
// avoid having to lock
struct debounce_filter_impl_t : debounce_filter_t {
debounce_filter_impl_t()
: last_forwarded_(std::chrono::steady_clock::time_point::max()) {
}

explicit debounce_filter_impl_t(const debounce_filter_t &_source)
: debounce_filter_t(_source),
last_forwarded_(std::chrono::steady_clock::time_point::max()) {
}

std::chrono::steady_clock::time_point last_forwarded_;
};

using debounce_configuration_t =
std::map<service_t,
std::map<instance_t,
std::map<event_t,
std::shared_ptr<debounce_filter_impl_t>>>>;

} // namespace vsomeip_v3

#endif // VSOMEIP_V3_DEBOUNCE_HPP
2 changes: 1 addition & 1 deletion implementation/configuration/include/e2e.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace vsomeip_v3 {
namespace cfg {

struct e2e {
using custom_parameters_t = std::map<std::string, std::string, std::less<>>;
typedef std::map<std::string, std::string> custom_parameters_t;

e2e() :
variant(""),
Expand Down
12 changes: 5 additions & 7 deletions implementation/configuration/include/internal.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@

#define VSOMEIP_DEFAULT_CONNECT_TIMEOUT 100
#define VSOMEIP_MAX_CONNECT_TIMEOUT 1600
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 100
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 500
#define VSOMEIP_DEFAULT_FLUSH_TIMEOUT 1000
#define VSOMEIP_ROUTING_ROOT_RECONNECT_RETRIES 10000
#define VSOMEIP_ROUTING_ROOT_RECONNECT_INTERVAL 10 // miliseconds

#define VSOMEIP_DEFAULT_SHUTDOWN_TIMEOUT 5000

Expand Down Expand Up @@ -126,11 +128,11 @@

namespace vsomeip_v3 {

enum class subscription_state_e {
typedef enum {
SUBSCRIPTION_ACKNOWLEDGED,
SUBSCRIPTION_NOT_ACKNOWLEDGED,
IS_SUBSCRIBING
};
} subscription_state_e;

const std::uint32_t MESSAGE_SIZE_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();

Expand All @@ -151,10 +153,6 @@ enum class port_type_e {
PT_UNKNOWN
};

using debounce_configuration_t =
std::map<service_t,
std::map<instance_t, std::map<event_t, std::shared_ptr<debounce_filter_t>>>>;

using partition_id_t = std::uint8_t;
const partition_id_t VSOMEIP_DEFAULT_PARTITION_ID = 0;

Expand Down
12 changes: 3 additions & 9 deletions implementation/configuration/include/internal_android.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@

#define VSOMEIP_DEFAULT_CONNECT_TIMEOUT 100
#define VSOMEIP_MAX_CONNECT_TIMEOUT 1600
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 100
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 500
#define VSOMEIP_DEFAULT_FLUSH_TIMEOUT 1000
#define VSOMEIP_ROUTING_ROOT_RECONNECT_RETRIES 10000
#define VSOMEIP_ROUTING_ROOT_RECONNECT_INTERVAL 10 // miliseconds

#define VSOMEIP_DEFAULT_SHUTDOWN_TIMEOUT 5000

Expand Down Expand Up @@ -138,14 +140,6 @@ enum class port_type_e {
PT_UNKNOWN
};

typedef std::map<service_t,
std::map<instance_t,
std::map<event_t,
std::shared_ptr<debounce_filter_t>
>
>
> debounce_configuration_t;

typedef uint8_t partition_id_t;
const partition_id_t VSOMEIP_DEFAULT_PARTITION_ID = 0;

Expand Down
2 changes: 1 addition & 1 deletion implementation/configuration/include/service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct service {

// [0] = debounce_time
// [1] = retention_time
using npdu_time_configuration_t = std::map<method_t, std::array<std::chrono::nanoseconds, 2>>;
typedef std::map<method_t, std::array<std::chrono::nanoseconds, 2>> npdu_time_configuration_t;
npdu_time_configuration_t debounce_times_requests_;
npdu_time_configuration_t debounce_times_responses_;

Expand Down
10 changes: 5 additions & 5 deletions implementation/configuration/src/configuration_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3772,7 +3772,7 @@ configuration_impl::load_service_debounce(

service_t its_service(0);
instance_t its_instance(0);
std::map<event_t, std::shared_ptr<debounce_filter_t>> its_debounces;
std::map<event_t, std::shared_ptr<debounce_filter_impl_t>> its_debounces;

for (auto i = _tree.begin(); i != _tree.end(); ++i) {
std::string its_key(i->first);
Expand Down Expand Up @@ -3818,7 +3818,7 @@ configuration_impl::load_service_debounce(
void
configuration_impl::load_events_debounce(
const boost::property_tree::ptree &_tree,
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces) {
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces) {

for (auto i = _tree.begin(); i != _tree.end(); ++i) {
load_event_debounce(i->second, _debounces);
Expand All @@ -3828,10 +3828,10 @@ configuration_impl::load_events_debounce(
void
configuration_impl::load_event_debounce(
const boost::property_tree::ptree &_tree,
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces) {
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces) {

event_t its_event(0);
auto its_debounce = std::make_shared<debounce_filter_t>();
auto its_debounce = std::make_shared<debounce_filter_impl_t>();

for (auto i = _tree.begin(); i != _tree.end(); ++i) {
std::string its_key(i->first);
Expand Down Expand Up @@ -4318,7 +4318,7 @@ void configuration_impl::load_secure_service(const boost::property_tree::ptree &
}
}

std::shared_ptr<debounce_filter_t>
std::shared_ptr<debounce_filter_impl_t>
configuration_impl::get_debounce(const std::string &_name,
service_t _service, instance_t _instance, event_t _event) const {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace vsomeip_v3 {
namespace e2e {
namespace profile_interface {

using check_status_t = std::uint8_t;
typedef uint8_t check_status_t;
enum generic_check_status : check_status_t { E2E_OK, E2E_WRONG_CRC, E2E_ERROR};


Expand Down
4 changes: 2 additions & 2 deletions implementation/endpoints/include/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

namespace vsomeip_v3 {

using message_buffer_t = std::vector<byte_t>;
using message_buffer_ptr_t = std::shared_ptr<message_buffer_t>;
typedef std::vector<byte_t> message_buffer_t;
typedef std::shared_ptr<message_buffer_t> message_buffer_ptr_t;

#if 0
struct timing {
Expand Down
Loading

0 comments on commit ebb5312

Please sign in to comment.