vsomeip
vsomeip copied to clipboard
Need help for load data, load service interface or use of service id , instance id from config json file
I need to use the service id,instance id's of client and server from confiuration json file for establishing communication instead of hardcoded id's.I could not find any resources online but I could see api's load_data,load_service,load_clients in configuration_impl.hpp,(which loads the json file and extracts the relevant id's)however these api's are not provided in interfaces. Could someone please let me know how to go about this?
The hardcoded id needs to be present in the code, because different callbacks need to be registered for different service instances, The service instance id in the configuration file should be consistent with the definition in the code.
Reference documentation:https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes
@ims0 thanks for confirming
I need to use the service id,instance id's of client and server from confiuration json file for establishing communication instead of hardcoded id's.I could not find any resources online but I could see api's load_data,load_service,load_clients in configuration_impl.hpp,(which loads the json file and extracts the relevant id's)however these api's are not provided in interfaces. Could someone please let me know how to go about this?
I'm also trying to do that and i figured out that in configuration_imp.cpp we are getting stored values of service id and instance id in "services_" through this map function. line 427: std::map<service_t, std::map<instance_t, std::shared_ptr
The original problem is solved, @mohitrao12 if you have a problem, please open a new ticket with all the details.