Skip to content

Commit ebb5312

Browse files
vsomeip 3.3.6 (#455)
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
1 parent 80716c6 commit ebb5312

File tree

69 files changed

+346
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+346
-327
lines changed

Android.bp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ cc_library_shared {
8080

8181
cflags: [
8282
"-DWITHOUT_SYSTEMD",
83-
"-DVSOMEIP_COMPAT_VERSION=\"3.3.5\"",
83+
"-DVSOMEIP_COMPAT_VERSION=\"3.3.6\"",
8484
"-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\"",
8585
"-DUSE_DLT",
8686
],

Android.mk

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ LOCAL_CFLAGS := \
100100
-frtti \
101101
-fexceptions \
102102
-DWITHOUT_SYSTEMD \
103-
-DVSOMEIP_VERSION=\"3.3.5\" \
103+
-DVSOMEIP_VERSION=\"3.3.6\" \
104104
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
105105
-Wno-unused-parameter \
106106
-Wno-non-virtual-dtor \
@@ -147,7 +147,7 @@ LOCAL_CFLAGS := \
147147
-frtti \
148148
-fexceptions \
149149
-DWITHOUT_SYSTEMD \
150-
-DVSOMEIP_VERSION=\"3.3.5\" \
150+
-DVSOMEIP_VERSION=\"3.3.6\" \
151151
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
152152
-Wno-unused-parameter \
153153
-Wno-non-virtual-dtor \
@@ -194,8 +194,8 @@ LOCAL_CFLAGS := \
194194
-frtti \
195195
-fexceptions \
196196
-DWITHOUT_SYSTEMD \
197-
-DVSOMEIP_VERSION=\"3.3.5\" \
198-
-DVSOMEIP_COMPAT_VERSION=\"3.3.5\" \
197+
-DVSOMEIP_VERSION=\"3.3.6\" \
198+
-DVSOMEIP_COMPAT_VERSION=\"3.3.6\" \
199199
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
200200
-Wno-unused-parameter \
201201
-Wno-non-virtual-dtor \

CHANGES

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changes
22
=======
33

4+
v3.3.6
5+
- The "last forwarded" timestamp must be handled per event
6+
- Fix deadlock
7+
- Restart the connection on broken unix sockets
8+
- Fix routing root not binding to local tcp if
9+
- Rework connecting timeout
10+
411
v3.3.5.1
512
- Fix typo in application_impl.cpp
613
- Update load_balancing_option_impl.cpp

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set (VSOMEIP_COMPAT_NAME vsomeip)
1111

1212
set (VSOMEIP_MAJOR_VERSION 3)
1313
set (VSOMEIP_MINOR_VERSION 3)
14-
set (VSOMEIP_PATCH_VERSION 5)
14+
set (VSOMEIP_PATCH_VERSION 6)
1515
set (VSOMEIP_HOTFIX_VERSION 0)
1616

1717
set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})

implementation/configuration/include/application_configuration.hpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@
1212
#include <vsomeip/primitive_types.hpp>
1313
#include <vsomeip/plugin.hpp>
1414

15-
#ifdef ANDROID
16-
#include "internal_android.hpp"
17-
#else
18-
#include "internal.hpp"
19-
#endif
15+
#include "debounce_filter_impl.hpp"
2016

2117
namespace vsomeip_v3 {
2218

23-
struct debounce_filter_t;
24-
2519
namespace cfg {
2620

2721
struct application_configuration {

implementation/configuration/include/configuration.hpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
namespace vsomeip_v3 {
4141

4242
class event;
43-
struct debounce_filter_t;
43+
struct debounce_filter_impl_t;
4444

4545
class configuration {
4646
public:
@@ -212,18 +212,18 @@ class configuration {
212212
virtual uint32_t get_log_status_interval() const = 0;
213213

214214
// TTL factor
215-
using ttl_factor_t = std::uint32_t;
216-
using ttl_map_t = std::map<service_t, std::map<instance_t, ttl_factor_t>>;
215+
typedef std::uint32_t ttl_factor_t;
216+
typedef std::map<service_t, std::map<instance_t, ttl_factor_t>> ttl_map_t;
217217
virtual ttl_map_t get_ttl_factor_offers() const = 0;
218218
virtual ttl_map_t get_ttl_factor_subscribes() const = 0;
219219

220220
// Debouncing
221-
virtual std::shared_ptr<debounce_filter_t> get_debounce(
221+
virtual std::shared_ptr<debounce_filter_impl_t> get_debounce(
222222
const std::string &_name,
223223
service_t _service, instance_t _instance, event_t _event) const = 0;
224224

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

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

250-
using sd_acceptance_rules_t = std::map<
250+
typedef std::map<
251251
boost::asio::ip::address, // other device
252252
std::pair<
253253
std::string, // path to file that determines whether or not IPsec is active
@@ -259,7 +259,7 @@ class configuration {
259259
>
260260
>
261261
>
262-
>;
262+
> sd_acceptance_rules_t;
263263
virtual sd_acceptance_rules_t get_sd_acceptance_rules() = 0;
264264
virtual void set_sd_acceptance_rules_active(
265265
const boost::asio::ip::address& _address, bool _enable) = 0;

implementation/configuration/include/configuration_impl.hpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
namespace vsomeip_v3 {
3030

31-
struct debounce_filter_t;
32-
3331
namespace cfg {
3432

3533
struct client;
@@ -204,7 +202,7 @@ class configuration_impl:
204202
VSOMEIP_EXPORT ttl_map_t get_ttl_factor_offers() const;
205203
VSOMEIP_EXPORT ttl_map_t get_ttl_factor_subscribes() const;
206204

207-
VSOMEIP_EXPORT std::shared_ptr<debounce_filter_t> get_debounce(
205+
VSOMEIP_EXPORT std::shared_ptr<debounce_filter_impl_t> get_debounce(
208206
const std::string &_name,
209207
service_t _service, instance_t _instance, event_t _event) const;
210208

@@ -373,9 +371,9 @@ class configuration_impl:
373371
void load_service_debounce(const boost::property_tree::ptree &_tree,
374372
debounce_configuration_t &_debounces);
375373
void load_events_debounce(const boost::property_tree::ptree &_tree,
376-
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces);
374+
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces);
377375
void load_event_debounce(const boost::property_tree::ptree &_tree,
378-
std::map<event_t, std::shared_ptr<debounce_filter_t> > &_debounces);
376+
std::map<event_t, std::shared_ptr<debounce_filter_impl_t> > &_debounces);
379377
void load_event_debounce_ignore(const boost::property_tree::ptree &_tree,
380378
std::map<std::size_t, byte_t> &_ignore);
381379
void load_acceptances(const configuration_element &_element);

implementation/configuration/include/debounce.hpp

-39
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (C) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2+
// This Source Code Form is subject to the terms of the Mozilla Public
3+
// License, v. 2.0. If a copy of the MPL was not distributed with this
4+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
5+
6+
#ifndef VSOMEIP_V3_DEBOUNCE_HPP
7+
#define VSOMEIP_V3_DEBOUNCE_HPP
8+
9+
#include <vsomeip/structured_types.hpp>
10+
11+
namespace vsomeip_v3 {
12+
13+
// Additionally store the last forwarded timestamp to
14+
// avoid having to lock
15+
struct debounce_filter_impl_t : debounce_filter_t {
16+
debounce_filter_impl_t()
17+
: last_forwarded_(std::chrono::steady_clock::time_point::max()) {
18+
}
19+
20+
explicit debounce_filter_impl_t(const debounce_filter_t &_source)
21+
: debounce_filter_t(_source),
22+
last_forwarded_(std::chrono::steady_clock::time_point::max()) {
23+
}
24+
25+
std::chrono::steady_clock::time_point last_forwarded_;
26+
};
27+
28+
using debounce_configuration_t =
29+
std::map<service_t,
30+
std::map<instance_t,
31+
std::map<event_t,
32+
std::shared_ptr<debounce_filter_impl_t>>>>;
33+
34+
} // namespace vsomeip_v3
35+
36+
#endif // VSOMEIP_V3_DEBOUNCE_HPP

implementation/configuration/include/e2e.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace vsomeip_v3 {
1616
namespace cfg {
1717

1818
struct e2e {
19-
using custom_parameters_t = std::map<std::string, std::string, std::less<>>;
19+
typedef std::map<std::string, std::string> custom_parameters_t;
2020

2121
e2e() :
2222
variant(""),

implementation/configuration/include/internal.hpp.in

+5-7
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272

7373
#define VSOMEIP_DEFAULT_CONNECT_TIMEOUT 100
7474
#define VSOMEIP_MAX_CONNECT_TIMEOUT 1600
75-
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 100
75+
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 500
7676
#define VSOMEIP_DEFAULT_FLUSH_TIMEOUT 1000
77+
#define VSOMEIP_ROUTING_ROOT_RECONNECT_RETRIES 10000
78+
#define VSOMEIP_ROUTING_ROOT_RECONNECT_INTERVAL 10 // miliseconds
7779

7880
#define VSOMEIP_DEFAULT_SHUTDOWN_TIMEOUT 5000
7981

@@ -126,11 +128,11 @@
126128

127129
namespace vsomeip_v3 {
128130

129-
enum class subscription_state_e {
131+
typedef enum {
130132
SUBSCRIPTION_ACKNOWLEDGED,
131133
SUBSCRIPTION_NOT_ACKNOWLEDGED,
132134
IS_SUBSCRIBING
133-
};
135+
} subscription_state_e;
134136

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

@@ -151,10 +153,6 @@ enum class port_type_e {
151153
PT_UNKNOWN
152154
};
153155

154-
using debounce_configuration_t =
155-
std::map<service_t,
156-
std::map<instance_t, std::map<event_t, std::shared_ptr<debounce_filter_t>>>>;
157-
158156
using partition_id_t = std::uint8_t;
159157
const partition_id_t VSOMEIP_DEFAULT_PARTITION_ID = 0;
160158

implementation/configuration/include/internal_android.hpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454

5555
#define VSOMEIP_DEFAULT_CONNECT_TIMEOUT 100
5656
#define VSOMEIP_MAX_CONNECT_TIMEOUT 1600
57-
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 100
57+
#define VSOMEIP_DEFAULT_CONNECTING_TIMEOUT 500
5858
#define VSOMEIP_DEFAULT_FLUSH_TIMEOUT 1000
59+
#define VSOMEIP_ROUTING_ROOT_RECONNECT_RETRIES 10000
60+
#define VSOMEIP_ROUTING_ROOT_RECONNECT_INTERVAL 10 // miliseconds
5961

6062
#define VSOMEIP_DEFAULT_SHUTDOWN_TIMEOUT 5000
6163

@@ -138,14 +140,6 @@ enum class port_type_e {
138140
PT_UNKNOWN
139141
};
140142

141-
typedef std::map<service_t,
142-
std::map<instance_t,
143-
std::map<event_t,
144-
std::shared_ptr<debounce_filter_t>
145-
>
146-
>
147-
> debounce_configuration_t;
148-
149143
typedef uint8_t partition_id_t;
150144
const partition_id_t VSOMEIP_DEFAULT_PARTITION_ID = 0;
151145

implementation/configuration/include/service.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct service {
3232

3333
// [0] = debounce_time
3434
// [1] = retention_time
35-
using npdu_time_configuration_t = std::map<method_t, std::array<std::chrono::nanoseconds, 2>>;
35+
typedef std::map<method_t, std::array<std::chrono::nanoseconds, 2>> npdu_time_configuration_t;
3636
npdu_time_configuration_t debounce_times_requests_;
3737
npdu_time_configuration_t debounce_times_responses_;
3838

implementation/configuration/src/configuration_impl.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,7 @@ configuration_impl::load_service_debounce(
37723772

37733773
service_t its_service(0);
37743774
instance_t its_instance(0);
3775-
std::map<event_t, std::shared_ptr<debounce_filter_t>> its_debounces;
3775+
std::map<event_t, std::shared_ptr<debounce_filter_impl_t>> its_debounces;
37763776

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

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

38333833
event_t its_event(0);
3834-
auto its_debounce = std::make_shared<debounce_filter_t>();
3834+
auto its_debounce = std::make_shared<debounce_filter_impl_t>();
38353835

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

4321-
std::shared_ptr<debounce_filter_t>
4321+
std::shared_ptr<debounce_filter_impl_t>
43224322
configuration_impl::get_debounce(const std::string &_name,
43234323
service_t _service, instance_t _instance, event_t _event) const {
43244324

implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace vsomeip_v3 {
1212
namespace e2e {
1313
namespace profile_interface {
1414

15-
using check_status_t = std::uint8_t;
15+
typedef uint8_t check_status_t;
1616
enum generic_check_status : check_status_t { E2E_OK, E2E_WRONG_CRC, E2E_ERROR};
1717

1818

implementation/endpoints/include/buffer.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
namespace vsomeip_v3 {
3232

33-
using message_buffer_t = std::vector<byte_t>;
34-
using message_buffer_ptr_t = std::shared_ptr<message_buffer_t>;
33+
typedef std::vector<byte_t> message_buffer_t;
34+
typedef std::shared_ptr<message_buffer_t> message_buffer_ptr_t;
3535

3636
#if 0
3737
struct timing {

0 commit comments

Comments
 (0)