summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/request-sample.cpp5
-rw-r--r--examples/response-sample.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/examples/request-sample.cpp b/examples/request-sample.cpp
index 3125291..04c815a 100644
--- a/examples/request-sample.cpp
+++ b/examples/request-sample.cpp
@@ -50,6 +50,11 @@ public:
this,
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+ app_->register_availability_handler(SAMPLE_SERVICE_ID + 1, SAMPLE_INSTANCE_ID,
+ std::bind(&client_sample::on_availability,
+ this,
+ std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+
app_->register_message_handler(
vsomeip::ANY_SERVICE, SAMPLE_INSTANCE_ID, vsomeip::ANY_METHOD,
std::bind(&client_sample::on_message,
diff --git a/examples/response-sample.cpp b/examples/response-sample.cpp
index 43f4abe..fe2f1c8 100644
--- a/examples/response-sample.cpp
+++ b/examples/response-sample.cpp
@@ -45,10 +45,12 @@ class service_sample {
void offer() {
app_->offer_service(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID);
+ app_->offer_service(SAMPLE_SERVICE_ID + 1, SAMPLE_INSTANCE_ID);
}
void stop_offer() {
app_->stop_offer_service(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID);
+ app_->stop_offer_service(SAMPLE_SERVICE_ID + 1, SAMPLE_INSTANCE_ID);
}
void on_event(vsomeip::event_type_e _event) {