vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

subscription handler cannot get correct client id from json config

Open zhj179 opened this issue 2 years ago • 1 comments

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?

zhj179 avatar May 21 '22 14:05 zhj179

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

ByteXiaoTang avatar Jul 18 '22 07:07 ByteXiaoTang