'How to change SOME/IP configuration file in Qt creator?

I'm trying to build someip UI in Qt creator to display client-side log in the UI based on https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes. Basicly I just ported request-sample.cpp into mainwindow.h and add a button to call init() and start(), then log will shown on testBrowser.

void MainWindow::on_pushButton_clicked() {
    bool use_tcp = false;
    uint32_t cycle = 1000;
    sample_ptr = new client_sample(use_tcp, false, cycle);
    sample_ptr->start();

My question is I want to change default configuration file, say change vsomeip.json to vsomeip-udp-client.json, but I don't know how to approach this.

From my understanding, the following method in https://github.com/COVESA/vsomeip/blob/master/documentation/vsomeipUserGuide will run ./my_vsomeip_application and show log on terminal. Is there a way to change default configuration file in Qt creator, so the log can display in UI?

[source, bash]
----
#!/bin/bash
export VSOMEIP_APPLICATION_NAME=my_vsomeip_client
export VSOMEIP_CONFIGURATION=my_settings.json
./my_vsomeip_application
----

Any suggestions are appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source