summaryrefslogtreecommitdiff
path: root/implementation/configuration/include
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/configuration/include')
-rw-r--r--implementation/configuration/include/client.hpp28
-rw-r--r--implementation/configuration/include/configuration.hpp39
-rw-r--r--implementation/configuration/include/configuration_impl.hpp137
-rw-r--r--implementation/configuration/include/event.hpp2
-rw-r--r--implementation/configuration/include/eventgroup.hpp4
-rw-r--r--implementation/configuration/include/internal.hpp.in61
-rw-r--r--implementation/configuration/include/service.hpp3
-rw-r--r--implementation/configuration/include/trace.hpp62
-rw-r--r--implementation/configuration/include/watchdog.hpp21
9 files changed, 306 insertions, 51 deletions
diff --git a/implementation/configuration/include/client.hpp b/implementation/configuration/include/client.hpp
new file mode 100644
index 0000000..fcb4395
--- /dev/null
+++ b/implementation/configuration/include/client.hpp
@@ -0,0 +1,28 @@
+// Copyright (C) 2016 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_CFG_CLIENT_HPP
+#define VSOMEIP_CFG_CLIENT_HPP
+
+#include <map>
+#include <memory>
+#include <set>
+
+#include <vsomeip/primitive_types.hpp>
+
+namespace vsomeip {
+namespace cfg {
+
+struct client {
+ service_t service_;
+ instance_t instance_;
+
+ std::map<bool, std::set<uint16_t> > ports_;
+};
+
+} // namespace cfg
+} // namespace vsomeip
+
+#endif // VSOMEIP_CFG_CLIENT_HPP
diff --git a/implementation/configuration/include/configuration.hpp b/implementation/configuration/include/configuration.hpp
index 2f106ee..8dab1b4 100644
--- a/implementation/configuration/include/configuration.hpp
+++ b/implementation/configuration/include/configuration.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
@@ -19,6 +19,7 @@
#include <vsomeip/primitive_types.hpp>
#include "internal.hpp"
+#include "trace.hpp"
namespace vsomeip {
@@ -32,6 +33,7 @@ public:
virtual ~configuration() {}
virtual const boost::asio::ip::address & get_unicast_address() const = 0;
+ virtual unsigned short get_diagnosis_address() const = 0;
virtual bool is_v4() const = 0;
virtual bool is_v6() const = 0;
@@ -45,29 +47,36 @@ public:
virtual std::string get_unicast_address(service_t _service,
instance_t _instance) const = 0;
- virtual std::string get_multicast_address(service_t _service,
- instance_t _instance) const = 0;
- virtual uint16_t get_multicast_port(service_t _service,
- instance_t _instance) const = 0;
- virtual uint16_t get_multicast_group(service_t _service,
- instance_t _instance) const = 0;
virtual uint16_t get_reliable_port(service_t _service,
instance_t _instance) const = 0;
- virtual bool is_someip(service_t _service, instance_t _instance) const = 0;
virtual bool has_enabled_magic_cookies(std::string _address,
uint16_t _port) const = 0;
virtual uint16_t get_unreliable_port(service_t _service,
instance_t _instance) const = 0;
+ virtual bool is_someip(service_t _service, instance_t _instance) const = 0;
+
+ virtual bool get_client_port(
+ service_t _service, instance_t _instance, bool _reliable,
+ std::map<bool, std::set<uint16_t> > &_used, uint16_t &_port) const = 0;
+
virtual std::set<std::pair<service_t, instance_t> > get_remote_services() const = 0;
+ virtual bool get_multicast(service_t _service, instance_t _instance,
+ eventgroup_t _eventgroup, std::string &_address, uint16_t &_port) const = 0;
+
virtual client_t get_id(const std::string &_name) const = 0;
- virtual std::size_t get_num_dispatchers(const std::string &_name) const = 0;
+ virtual bool is_configured_client_id(client_t _id) const = 0;
+
+ virtual std::size_t get_max_dispatchers(const std::string &_name) const = 0;
+ virtual std::size_t get_max_dispatch_time(const std::string &_name) const = 0;
virtual std::uint32_t get_max_message_size_local() const = 0;
virtual std::uint32_t get_message_size_reliable(const std::string& _address,
std::uint16_t _port) const = 0;
+ virtual bool supports_selective_broadcasts(boost::asio::ip::address _address) const = 0;
+
// Service Discovery configuration
virtual bool is_sd_enabled() const = 0;
@@ -82,6 +91,18 @@ public:
virtual ttl_t get_sd_ttl() const = 0;
virtual int32_t get_sd_cyclic_offer_delay() const = 0;
virtual int32_t get_sd_request_response_delay() const = 0;
+
+ // Trace configuration
+ virtual std::shared_ptr<cfg::trace> get_trace() const = 0;
+
+ // Watchdog
+ virtual bool is_watchdog_enabled() const = 0;
+ virtual uint32_t get_watchdog_timeout() const = 0;
+ virtual uint32_t get_allowed_missing_pongs() const = 0;
+
+ // File permissions
+ virtual std::uint32_t get_umask() const = 0;
+ virtual std::uint32_t get_permissions_shm() const = 0;
};
} // namespace vsomeip
diff --git a/implementation/configuration/include/configuration_impl.hpp b/implementation/configuration/include/configuration_impl.hpp
index a6ca21c..87a1d15 100644
--- a/implementation/configuration/include/configuration_impl.hpp
+++ b/implementation/configuration/include/configuration_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
@@ -10,16 +10,31 @@
#include <memory>
#include <mutex>
#include <vector>
+#include <unordered_set>
#include <boost/property_tree/ptree.hpp>
+#include "trace.hpp"
#include "configuration.hpp"
+#include "watchdog.hpp"
namespace vsomeip {
namespace cfg {
+struct client;
struct service;
struct servicegroup;
+struct eventgroup;
+struct watchdog;
+
+struct element {
+ std::string name_;
+ boost::property_tree::ptree tree_;
+
+ bool operator<(const element &_other) const {
+ return (name_ < _other.name_);
+ }
+};
class configuration_impl: public configuration {
public:
@@ -31,10 +46,11 @@ public:
VSOMEIP_EXPORT configuration_impl(const configuration_impl &_cfg);
VSOMEIP_EXPORT virtual ~configuration_impl();
- VSOMEIP_EXPORT void load(const boost::property_tree::ptree &_tree);
- VSOMEIP_EXPORT void load_log(const std::vector<boost::property_tree::ptree> &_trees);
+ VSOMEIP_EXPORT void load(const element &_element);
+ VSOMEIP_EXPORT void load_log(const std::vector<element> &_elements);
VSOMEIP_EXPORT const boost::asio::ip::address & get_unicast_address() const;
+ VSOMEIP_EXPORT unsigned short get_diagnosis_address() const;
VSOMEIP_EXPORT bool is_v4() const;
VSOMEIP_EXPORT bool is_v6() const;
@@ -45,12 +61,6 @@ public:
VSOMEIP_EXPORT boost::log::trivial::severity_level get_loglevel() const;
VSOMEIP_EXPORT std::string get_unicast_address(service_t _service, instance_t _instance) const;
- VSOMEIP_EXPORT std::string get_multicast_address(service_t _service,
- instance_t _instance) const;
- VSOMEIP_EXPORT uint16_t get_multicast_port(service_t _service,
- instance_t _instance) const;
- VSOMEIP_EXPORT uint16_t get_multicast_group(service_t _service,
- instance_t _instance) const;
VSOMEIP_EXPORT uint16_t get_reliable_port(service_t _service, instance_t _instance) const;
VSOMEIP_EXPORT bool has_enabled_magic_cookies(std::string _address, uint16_t _port) const;
@@ -59,17 +69,28 @@ public:
VSOMEIP_EXPORT bool is_someip(service_t _service, instance_t _instance) const;
+ VSOMEIP_EXPORT bool get_client_port(service_t _service, instance_t _instance, bool _reliable,
+ std::map<bool, std::set<uint16_t> > &_used, uint16_t &_port) const;
+
VSOMEIP_EXPORT const std::string & get_routing_host() const;
VSOMEIP_EXPORT client_t get_id(const std::string &_name) const;
- VSOMEIP_EXPORT std::size_t get_num_dispatchers(const std::string &_name) const;
+ VSOMEIP_EXPORT bool is_configured_client_id(client_t _id) const;
+
+ VSOMEIP_EXPORT std::size_t get_max_dispatchers(const std::string &_name) const;
+ VSOMEIP_EXPORT std::size_t get_max_dispatch_time(const std::string &_name) const;
VSOMEIP_EXPORT std::set<std::pair<service_t, instance_t> > get_remote_services() const;
+ VSOMEIP_EXPORT bool get_multicast(service_t _service, instance_t _instance,
+ eventgroup_t _eventgroup, std::string &_address, uint16_t &_port) const;
+
VSOMEIP_EXPORT std::uint32_t get_max_message_size_local() const;
VSOMEIP_EXPORT std::uint32_t get_message_size_reliable(const std::string& _address,
std::uint16_t _port) const;
+ VSOMEIP_EXPORT bool supports_selective_broadcasts(boost::asio::ip::address _address) const;
+
// Service Discovery configuration
VSOMEIP_EXPORT bool is_sd_enabled() const;
@@ -85,31 +106,65 @@ public:
VSOMEIP_EXPORT int32_t get_sd_cyclic_offer_delay() const;
VSOMEIP_EXPORT int32_t get_sd_request_response_delay() const;
+ // Trace configuration
+ VSOMEIP_EXPORT std::shared_ptr<cfg::trace> get_trace() const;
+
+ VSOMEIP_EXPORT bool is_watchdog_enabled() const;
+ VSOMEIP_EXPORT uint32_t get_watchdog_timeout() const;
+ VSOMEIP_EXPORT uint32_t get_allowed_missing_pongs() const;
+
+
+ VSOMEIP_EXPORT std::uint32_t get_umask() const;
+ VSOMEIP_EXPORT std::uint32_t get_permissions_shm() const;
+
private:
- void get_logging_configuration(const boost::property_tree::ptree &_tree);
+ void get_logging_configuration(const element &_element,
+ std::set<std::string> &_warnings);
- void get_someip_configuration(const boost::property_tree::ptree &_tree);
+ void get_someip_configuration(const element &_element);
void get_services_configuration(const boost::property_tree::ptree &_tree);
+ void get_clients_configuration(const boost::property_tree::ptree &_tree);
void get_payload_sizes_configuration(const boost::property_tree::ptree &_tree);
- void get_routing_configuration(const boost::property_tree::ptree &_tree);
- void get_service_discovery_configuration(
- const boost::property_tree::ptree &_tree);
- void get_applications_configuration(const boost::property_tree::ptree &_tree);
+ void get_routing_configuration(const element &_element);
+ void get_service_discovery_configuration(const element &_element);
+ void get_applications_configuration(const element &_tree);
+ void get_trace_configuration(const element &_tree);
+ void get_supports_selective_broadcasts(const boost::property_tree::ptree &_tree);
+ void get_watchdog_configuration(const element &_element);
void get_servicegroup_configuration(
const boost::property_tree::ptree &_tree);
void get_delays_configuration(const boost::property_tree::ptree &_tree);
void get_service_configuration(const boost::property_tree::ptree &_tree,
const std::string &_unicast_address);
+ void get_client_configuration(const boost::property_tree::ptree &_tree);
+ std::set<uint16_t> get_client_port_configuration(
+ const boost::property_tree::ptree &_tree);
void get_event_configuration(std::shared_ptr<service> &_service,
const boost::property_tree::ptree &_tree);
void get_eventgroup_configuration(std::shared_ptr<service> &_service,
const boost::property_tree::ptree &_tree);
void get_application_configuration(
+ const boost::property_tree::ptree &_tree, const std::string &_file_name);
+ void get_trace_channels_configuration(
const boost::property_tree::ptree &_tree);
-
- servicegroup * find_servicegroup(const std::string &_name) const;
- service * find_service(service_t _service, instance_t _instance) const;
+ void get_trace_channel_configuration(
+ const boost::property_tree::ptree &_tree);
+ void get_trace_filters_configuration(
+ const boost::property_tree::ptree &_tree);
+ void get_trace_filter_configuration(
+ const boost::property_tree::ptree &_tree);
+ void get_trace_filter_expressions(
+ const boost::property_tree::ptree &_tree,
+ std::string &_criteria,
+ std::shared_ptr<trace_filter_rule> &_filter_rule);
+ void get_permission_configuration(const element &_element);
+
+ servicegroup *find_servicegroup(const std::string &_name) const;
+ std::shared_ptr<client> find_client(service_t _service, instance_t _instance) const;
+ std::shared_ptr<service> find_service(service_t _service, instance_t _instance) const;
+ std::shared_ptr<eventgroup> find_eventgroup(service_t _service,
+ instance_t _instance, eventgroup_t _eventgroup) const;
private:
static std::shared_ptr<configuration_impl> the_configuration;
@@ -118,6 +173,7 @@ private:
protected:
// Configuration data
boost::asio::ip::address unicast_;
+ unsigned short diagnosis_;
bool has_console_log_;
bool has_file_log_;
@@ -125,12 +181,17 @@ protected:
std::string logfile_;
boost::log::trivial::severity_level loglevel_;
- std::map<std::string, std::pair<client_t, std::size_t>> applications_;
+ std::map<std::string, std::tuple<client_t, std::size_t, std::size_t>> applications_;
+ std::set<client_t> client_identifiers_;
std::map<service_t,
std::map<instance_t,
std::shared_ptr<service> > > services_;
+ std::map<service_t,
+ std::map<instance_t,
+ std::shared_ptr<client> > > clients_;
+
std::string routing_host_;
bool is_sd_enabled_;
@@ -150,6 +211,42 @@ protected:
std::map<std::string, std::map<std::uint16_t, std::uint32_t>> message_sizes_;
std::uint32_t max_configured_message_size_;
+
+ std::shared_ptr<trace> trace_;
+
+ std::unordered_set<std::string> supported_selective_addresses;
+
+ std::shared_ptr<watchdog> watchdog_;
+
+ enum element_type_e {
+ ET_UNICAST,
+ ET_DIAGNOSIS,
+ ET_LOGGING_CONSOLE,
+ ET_LOGGING_FILE,
+ ET_LOGGING_DLT,
+ ET_LOGGING_LEVEL,
+ ET_ROUTING,
+ ET_SERVICE_DISCOVERY_ENABLE,
+ ET_SERVICE_DISCOVERY_PROTOCOL,
+ ET_SERVICE_DISCOVERY_MULTICAST,
+ ET_SERVICE_DISCOVERY_PORT,
+ ET_SERVICE_DISCOVERY_INITIAL_DELAY_MIN,
+ ET_SERVICE_DISCOVERY_INITIAL_DELAY_MAX,
+ ET_SERVICE_DISCOVERY_REPETITION_BASE_DELAY,
+ ET_SERVICE_DISCOVERY_REPETITION_MAX,
+ ET_SERVICE_DISCOVERY_TTL,
+ ET_SERVICE_DISCOVERY_CYCLIC_OFFER_DELAY,
+ ET_SERVICE_DISCOVERY_REQUEST_RESPONSE_DELAY,
+ ET_WATCHDOG_ENABLE,
+ ET_WATCHDOG_TIMEOUT,
+ ET_WATCHDOG_ALLOWED_MISSING_PONGS,
+ ET_TRACING_ENABLE,
+ ET_MAX = 22
+ };
+
+ bool is_configured_[ET_MAX];
+ std::uint32_t permissions_shm_;
+ std::uint32_t umask_;
};
} // namespace cfg
diff --git a/implementation/configuration/include/event.hpp b/implementation/configuration/include/event.hpp
index e932289..d488ec4 100644
--- a/implementation/configuration/include/event.hpp
+++ b/implementation/configuration/include/event.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
diff --git a/implementation/configuration/include/eventgroup.hpp b/implementation/configuration/include/eventgroup.hpp
index 27bf722..93a91a3 100644
--- a/implementation/configuration/include/eventgroup.hpp
+++ b/implementation/configuration/include/eventgroup.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
@@ -18,6 +18,8 @@ struct event;
struct eventgroup {
eventgroup_t id_;
std::set<std::shared_ptr<event> > events_;
+ std::string multicast_address_;
+ uint16_t multicast_port_;
};
} // namespace cfg
diff --git a/implementation/configuration/include/internal.hpp.in b/implementation/configuration/include/internal.hpp.in
index 64b7105..d7770c9 100644
--- a/implementation/configuration/include/internal.hpp.in
+++ b/implementation/configuration/include/internal.hpp.in
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
@@ -26,20 +26,25 @@
#define VSOMEIP_ROUTING "@VSOMEIP_ROUTING@"
#define VSOMEIP_ROUTING_CLIENT 0
+#define VSOMEIP_ROUTING_INFO_SIZE_INIT 256
#ifdef WIN32
#define VSOMEIP_INTERNAL_BASE_PORT 51234
+#define __func__ __FUNCTION__
#endif
#define VSOMEIP_UNICAST_ADDRESS "@VSOMEIP_UNICAST_ADDRESS@"
#define VSOMEIP_DEFAULT_CONNECT_TIMEOUT 100
+#define VSOMEIP_MAX_CONNECT_TIMEOUT 1000
#define VSOMEIP_DEFAULT_FLUSH_TIMEOUT 1000
-#define VSOMEIP_DEFAULT_WATCHDOG_CYCLE 5000
#define VSOMEIP_DEFAULT_WATCHDOG_TIMEOUT 5000
#define VSOMEIP_DEFAULT_MAX_MISSING_PONGS 3
+#define VSOMEIP_MAX_DISPATCHERS 10
+#define VSOMEIP_MAX_DISPATCH_TIME 100
+
#define VSOMEIP_COMMAND_HEADER_SIZE 7
#define VSOMEIP_COMMAND_TYPE_POS 0
@@ -62,33 +67,53 @@
#define VSOMEIP_UNSUBSCRIBE 0x13
#define VSOMEIP_REQUEST_SERVICE 0x14
#define VSOMEIP_RELEASE_SERVICE 0x15
-
-#define VSOMEIP_SEND 0x17
-#define VSOMEIP_NOTIFY 0x18
-
-#define VSOMEIP_REGISTER_EVENT 0x19
-#define VSOMEIP_UNREGISTER_EVENT 0x1A
-
-#define VSOMEIP_OFFER_SERVICE_COMMAND_SIZE 20
-#define VSOMEIP_REQUEST_SERVICE_COMMAND_SIZE 21
-#define VSOMEIP_STOP_OFFER_SERVICE_COMMAND_SIZE 11
-#define VSOMEIP_SUBSCRIBE_COMMAND_SIZE 19
+#define VSOMEIP_SUBSCRIBE_NACK 0x16
+#define VSOMEIP_SUBSCRIBE_ACK 0x17
+
+#define VSOMEIP_SEND 0x18
+#define VSOMEIP_NOTIFY 0x19
+#define VSOMEIP_NOTIFY_ONE 0x1A
+
+#define VSOMEIP_REGISTER_EVENT 0x1B
+#define VSOMEIP_UNREGISTER_EVENT 0x1C
+#define VSOMEIP_ID_RESPONSE 0x1D
+
+#define VSOMEIP_OFFER_SERVICE_COMMAND_SIZE 16
+#define VSOMEIP_REQUEST_SERVICE_COMMAND_SIZE 17
+#define VSOMEIP_RELEASE_SERVICE_COMMAND_SIZE 11
+#define VSOMEIP_STOP_OFFER_SERVICE_COMMAND_SIZE 16
+#define VSOMEIP_SUBSCRIBE_COMMAND_SIZE 16
+#define VSOMEIP_SUBSCRIBE_ACK_COMMAND_SIZE 13
+#define VSOMEIP_SUBSCRIBE_NACK_COMMAND_SIZE 13
#define VSOMEIP_UNSUBSCRIBE_COMMAND_SIZE 13
#define VSOMEIP_REGISTER_EVENT_COMMAND_SIZE 15
-#define VSOMEIP_UNREGISTER_EVENT_COMMAND_SIZE 13
+#define VSOMEIP_UNREGISTER_EVENT_COMMAND_SIZE 14
-#include <mutex>
+#ifndef WIN32
+#include <pthread.h>
+#endif
#define VSOMEIP_DATA_ID 0x677D
#define VSOMEIP_SHM_NAME "/vsomeip"
#define VSOMEIP_DIAGNOSIS_ADDRESS @VSOMEIP_DIAGNOSIS_ADDRESS@
+#define VSOMEIP_DEFAULT_SHM_PERMISSION 0666
+#define VSOMEIP_DEFAULT_UMASK_LOCAL_ENDPOINTS 0000
+
+#define VSOMEIP_MAX_CLIENTS 255
+
namespace vsomeip {
struct configuration_data_t {
- std::mutex mutex_;
- unsigned short next_client_id_;
- unsigned short ref_;
+#ifdef WIN32
+ void* mutex_;
+#else
+ pthread_mutex_t mutex_;
+#endif
+ unsigned short client_base_;
+
+ unsigned short used_client_ids_[VSOMEIP_MAX_CLIENTS];
+ int max_used_client_ids_index_;
};
} // namespace vsomeip
diff --git a/implementation/configuration/include/service.hpp b/implementation/configuration/include/service.hpp
index bbe235e..8e72a02 100644
--- a/implementation/configuration/include/service.hpp
+++ b/implementation/configuration/include/service.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2016 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/.
@@ -27,7 +27,6 @@ struct service {
std::string multicast_address_;
uint16_t multicast_port_;
- eventgroup_t multicast_group_;
std::string protocol_;
diff --git a/implementation/configuration/include/trace.hpp b/implementation/configuration/include/trace.hpp
new file mode 100644
index 0000000..cba4da8
--- /dev/null
+++ b/implementation/configuration/include/trace.hpp
@@ -0,0 +1,62 @@
+// Copyright (C) 2014-2016 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 CONFIGURATION_INCLUDE_TRACE_HPP_
+#define CONFIGURATION_INCLUDE_TRACE_HPP_
+
+#include <vsomeip/primitive_types.hpp>
+
+#include "../../tracing/include/defines.hpp"
+
+namespace vsomeip {
+namespace cfg {
+
+struct trace_channel {
+
+ trace_channel() :
+ id_(VSOMEIP_TC_DEFAULT_CHANNEL_ID),
+ name_(VSOMEIP_TC_DEFAULT_CHANNEL_NAME) {
+
+ }
+
+ trace_channel_t id_;
+ std::string name_;
+};
+
+struct trace_filter_rule {
+
+ trace_filter_rule() :
+ channel_(VSOMEIP_TC_DEFAULT_CHANNEL_ID),
+ services_(),
+ methods_(),
+ clients_() {
+
+ }
+
+ trace_channel_t channel_;
+ std::vector<service_t> services_;
+ std::vector<method_t> methods_;
+ std::vector<client_t> clients_;
+};
+
+struct trace {
+
+ trace() :
+ channels_(),
+ filter_rules_(),
+ is_enabled_(false) {
+ channels_.push_back(std::make_shared<trace_channel>());
+ }
+
+ std::vector<std::shared_ptr<trace_channel>> channels_;
+ std::vector<std::shared_ptr<trace_filter_rule>> filter_rules_;
+
+ bool is_enabled_;
+};
+
+} // namespace cfg
+} // namespace vsomeip
+
+#endif /* CONFIGURATION_INCLUDE_TRACE_HPP_ */
diff --git a/implementation/configuration/include/watchdog.hpp b/implementation/configuration/include/watchdog.hpp
new file mode 100644
index 0000000..1d5696d
--- /dev/null
+++ b/implementation/configuration/include/watchdog.hpp
@@ -0,0 +1,21 @@
+// Copyright (C) 2014-2016 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_CFG_WATCHDOG_HPP_
+#define VSOMEIP_CFG_WATCHDOG_HPP_
+
+namespace vsomeip {
+namespace cfg {
+
+struct watchdog {
+ bool is_enabeled_;
+ uint32_t timeout_in_ms_;
+ uint32_t missing_pongs_allowed_;
+};
+
+} // namespace cfg
+} // namespace vsomeip
+
+#endif /* VSOMEIP_CFG_WATCHDOG_HPP_ */