vsomeip-register_state_handler() couldn't get success state value(ST_REGISTERED)

120 Views Asked by At

I am tring to run hello_world example in vsomeip(https://github.com/COVESA/vsomeip) on my target board.

I have done copy and paste the code(https://github.com/COVESA/vsomeip/blob/master/examples/hello_world/hello_world_service.hpp), but on_state_cbk always returned ST_DEREGISTERED(1).

    void on_state_cbk(vsomeip::state_type_e _state)
    {
        if(_state == vsomeip::state_type_e::ST_REGISTERED)
        {
            // we are registered at the runtime and can offer our service
            app_->offer_service(service_id, service_instance_id);
        }
    }

I found the log from the board.

2022-07-22 00:07:33.423251 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:34.382231 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:34.385522 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:34.427228 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:34.430350 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:36.390119 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:36.393370 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:36.434119 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:36.438154 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:38.397499 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:38.400779 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:38.441799 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:38.444881 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:39.404335 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:39.408416 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:39.448882 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:39.452264 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED
2022-07-22 00:07:41.411975 [warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
2022-07-22 00:07:41.415221 [info] routing_manager_proxy::on_disconnect: Client 0xffff calling host_->on_state with DEREGISTERED

I can see that above code returned ST_REGISTERED(0) on my Ubuntu, I can't see that value in my target board. Is there any condition to get ST_REGISTERED(0) in on_state callback function?

And is there a way to set the log file path without config.json?

0

There are 0 best solutions below