summaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
authorJuergen Gehring <juergen.gehring@bmw.de>2018-01-25 00:40:05 -0800
committerJuergen Gehring <juergen.gehring@bmw.de>2018-01-25 00:40:05 -0800
commit79fd5f7a34ed33392f71fa914a60b2e68b28de68 (patch)
tree5ea93513d0173ffe6dea57545cc5b28db591f082 /interface
parent5c43d511bd5b5e15eca521c4c71dfa69c6f1c90f (diff)
downloadvSomeIP-79fd5f7a34ed33392f71fa914a60b2e68b28de68.tar.gz
vsomeip 2.10.02.10.0
Diffstat (limited to 'interface')
-rw-r--r--interface/vsomeip/application.hpp19
-rw-r--r--interface/vsomeip/constants.hpp2
-rw-r--r--interface/vsomeip/handler.hpp1
-rw-r--r--interface/vsomeip/primitive_types.hpp1
4 files changed, 23 insertions, 0 deletions
diff --git a/interface/vsomeip/application.hpp b/interface/vsomeip/application.hpp
index fdf007e..42bd534 100644
--- a/interface/vsomeip/application.hpp
+++ b/interface/vsomeip/application.hpp
@@ -926,6 +926,25 @@ public:
*/
virtual void set_watchdog_handler(watchdog_handler_t _handler, std::chrono::seconds _interval) = 0;
+ /**
+ *
+ * \brief Registers a subscription handler.
+ *
+ * A subscription handler is called whenever the subscription state of an
+ * eventgroup changes. The callback is called with the client identifier
+ * and a boolean that indicates whether the client subscribed or
+ * unsubscribed.
+ *
+ * \param _service Service identifier of service instance whose
+ * subscription state is to be monitored.
+ * \param _instance Instance identifier of service instance whose
+ * subscription state is to be monitored.
+ * \param _eventgroup Eventgroup identifier of eventgroup whose
+ * subscription state is to be monitored.
+ * \param _handler Callback that shall be called.
+ *
+ */
+ virtual void register_async_subscription_handler(service_t _service, instance_t _instance, eventgroup_t _eventgroup, async_subscription_handler_t _handler) = 0;
};
/** @} */
diff --git a/interface/vsomeip/constants.hpp b/interface/vsomeip/constants.hpp
index 9aeee09..d45f2c1 100644
--- a/interface/vsomeip/constants.hpp
+++ b/interface/vsomeip/constants.hpp
@@ -54,6 +54,8 @@ const byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00,
const event_t ANY_EVENT = 0xFFFF;
const client_t ANY_CLIENT = 0xFFFF;
+const pending_subscription_id_t DEFAULT_SUBSCRIPTION = 0x0;
+
} // namespace vsomeip
#endif // VSOMEIP_CONSTANTS_HPP
diff --git a/interface/vsomeip/handler.hpp b/interface/vsomeip/handler.hpp
index ab4f118..bcb2aa8 100644
--- a/interface/vsomeip/handler.hpp
+++ b/interface/vsomeip/handler.hpp
@@ -22,6 +22,7 @@ typedef std::function< bool (client_t, bool) > subscription_handler_t;
typedef std::function< void (const uint16_t) > error_handler_t;
typedef std::function< void (const service_t, const instance_t, const eventgroup_t,
const event_t, const uint16_t) > subscription_status_handler_t;
+typedef std::function< void (client_t, bool, std::function< void (const bool) > )> async_subscription_handler_t;
typedef std::function< void (const std::vector<std::pair<service_t, instance_t>> &_services) > offered_services_handler_t;
typedef std::function< void () > watchdog_handler_t;
diff --git a/interface/vsomeip/primitive_types.hpp b/interface/vsomeip/primitive_types.hpp
index d6c90de..9f6c84a 100644
--- a/interface/vsomeip/primitive_types.hpp
+++ b/interface/vsomeip/primitive_types.hpp
@@ -43,6 +43,7 @@ typedef std::string trace_channel_t;
typedef std::string trace_filter_type_t;
+typedef std::uint16_t pending_subscription_id_t;
} // namespace vsomeip
#endif // VSOMEIP_PRIMITIVE_TYPES_HPP