| 29 | all_msg_acknowledged_(false), sender_(std::bind(&payload_test_client::run, this)) { } |
| 30 | |
| 31 | bool payload_test_client::init() { |
| 32 | if (!app_->init()) { |
| 33 | ADD_FAILURE() << "Couldn't initialize application"; |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | app_->register_state_handler(std::bind(&payload_test_client::on_state, this, std::placeholders::_1)); |
| 38 | |
| 39 | app_->register_message_handler(vsomeip::ANY_SERVICE, vsomeip_test::TEST_SERVICE_INSTANCE_ID, vsomeip::ANY_METHOD, |
| 40 | std::bind(&payload_test_client::on_message, this, std::placeholders::_1)); |
| 41 | |
| 42 | app_->register_availability_handler( |
| 43 | vsomeip_test::TEST_SERVICE_SERVICE_ID, vsomeip_test::TEST_SERVICE_INSTANCE_ID, |
| 44 | std::bind(&payload_test_client::on_availability, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); |
| 45 | return true; |
| 46 | } |
| 47 | |
| 48 | void payload_test_client::start() { |
| 49 | VSOMEIP_INFO << "Starting..."; |
no test coverage detected