MCPcopy Create free account
hub / github.com/COVESA/vsomeip / segment_message

Method segment_message

implementation/endpoints/src/server_endpoint_impl.cpp:340–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339template<typename Protocol>
340typename endpoint_impl<Protocol>::cms_ret_e
341server_endpoint_impl<Protocol>::segment_message(const std::uint8_t* const _data, std::uint32_t _size, const endpoint_type& _target) {
342
343 if (endpoint_impl<Protocol>::is_supporting_someip_tp_ && _data != nullptr) {
344 const service_t its_service = bithelper::read_uint16_be(&_data[VSOMEIP_SERVICE_POS_MIN]);
345 const method_t its_method = bithelper::read_uint16_be(&_data[VSOMEIP_METHOD_POS_MIN]);
346 instance_t its_instance = this->get_instance(its_service);
347
348 if (its_instance != ANY_INSTANCE) {
349 if (tp_segmentation_enabled({its_service, its_instance}, its_method)) {
350 std::uint16_t its_max_segment_length;
351 std::uint32_t its_separation_time;
352
353 this->configuration_->get_tp_configuration(its_service, its_instance, its_method, false, its_max_segment_length,
354 its_separation_time);
355 send_segments(tp::tp::tp_split_message(_data, _size, its_max_segment_length), its_separation_time, _target);
356 return endpoint_impl<Protocol>::cms_ret_e::MSG_WAS_SPLIT;
357 }
358 }
359 }
360 VSOMEIP_ERROR_P << "Dropping to big message (" << _size
361 << " Bytes). Maximum allowed message size is: " << endpoint_impl<Protocol>::max_message_size_ << " Bytes.";
362 return endpoint_impl<Protocol>::cms_ret_e::MSG_TOO_BIG;
363}
364
365template<typename Protocol>
366void server_endpoint_impl<Protocol>::recalculate_queue_size(endpoint_data_type& _data) const {

Callers

nothing calls this directly

Calls 2

get_tp_configurationMethod · 0.80
get_instanceMethod · 0.45

Tested by

no test coverage detected