vsomeip
vsomeip copied to clipboard
subscription handler cannot get correct client id from json config
I set a callback use app->register_subscription_handler for publisher,it works well when all publisher and subscribers run in one machine,but when I use separate host machines,I can't get the correct ID for subscriber1 and subscriber2,use app->subscribe can trigger this callback,but the client ID getting from the callback is always 0x0.
my configure in device A,and device B configure is only different in 'unicast':
{
"applications": [
{
"name": "publisher",
"id": "0x4444"
},
{
"name": "subscriber1",
"id": "0x5555"
},
{
"name": "subscriber2",
"id": "0x6667"
}
],
"services": [
{
"service": "0x9003",
"instance": "0x3303",
"unreliable": "31000",
"eventgroups": [
{
"eventgroup": "0x5001",
"events": [
"0x4001"
]
}
],
"events": [
{
"event": "0x4001",
"is_field": "false"
}
]
}
],
"service-discovery": {
"enable": "true",
"multicast": "224.244.224.245",
"port": "30490",
"protocol": "udp",
"initial_delay_min": "10",
"initial_delay_max": "100",
"repetitions_base_delay": "200",
"repetitions_max": "3",
"ttl": "3",
"cyclic_offer_delay": "2000",
"request_response_delay": "1500"
},
"unicast": "192.168.31.33"
}
how can I fix this,is there something wrong with my cnfigure?
in fact , between two machines , they use stub to stub communication, and the clientid set 0x0000 now . and message will transform between stub and proxy in the same machine. so it's not problem