| 338 | |
| 339 | template<typename Protocol> |
| 340 | typename endpoint_impl<Protocol>::cms_ret_e |
| 341 | server_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 | |
| 365 | template<typename Protocol> |
| 366 | void server_endpoint_impl<Protocol>::recalculate_queue_size(endpoint_data_type& _data) const { |
nothing calls this directly
no test coverage detected