vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

why notify api always use 2000 us ? weather there have a parameter to control the time delay

Open zhiwei2018 opened this issue 3 years ago • 1 comments
trafficstars

in notify-sample.cpp ,the code is: **while (is_offered_ && running_) { if (its_size == sizeof(its_data)) its_size = 1;

  for (uint32_t i = 0; i < its_size; ++i)
      its_data[i] = static_cast<uint8_t>(i);

  {
      std::lock_guard<std::mutex> its_lock(payload_mutex_);
      payload_->set_data(its_data, its_size);

      std::cout << "Setting event (Length=" << std::dec << its_size << ")." << std::endl;

      ### app_->notify(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID, SAMPLE_EVENT_ID, payload_);

  }

  its_size++;

  std::this_thread::sleep_for(std::chrono::milliseconds(cycle_));

}** if i set the cycle is >2ms, the api(app_->notify) use time 20us-40us if i set the cycle is 1ms, the api(app_->notify) use time 1ms if i set the cycle is 0ms, the api(app_->notify) use time 2ms

how can i let the data send to client in 500us or less ? weather there have a json parameter or api parameter to control the time delay

zhiwei2018 avatar Jun 14 '22 14:06 zhiwei2018

has deque in routing_manager

ByteXiaoTang avatar Jul 18 '22 07:07 ByteXiaoTang

config jitters

fengtuo58 avatar Nov 19 '22 10:11 fengtuo58

@zhiwei2018 Does the problem still occur?

joao-d avatar Mar 07 '23 16:03 joao-d