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

Method segment_message

implementation/endpoints/src/client_endpoint_impl.cpp:745–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743
744template<typename Protocol>
745typename endpoint_impl<Protocol>::cms_ret_e client_endpoint_impl<Protocol>::segment_message(const std::uint8_t* const _data,
746 std::uint32_t _size) {
747
748 if (endpoint_impl<Protocol>::is_supporting_someip_tp_ && _data != nullptr) {
749 const service_t its_service = bithelper::read_uint16_be(&_data[VSOMEIP_SERVICE_POS_MIN]);
750 const method_t its_method = bithelper::read_uint16_be(&_data[VSOMEIP_METHOD_POS_MIN]);
751 instance_t its_instance = this->get_instance(its_service);
752
753 if (its_instance != ANY_INSTANCE) {
754 if (tp_segmentation_enabled({its_service, its_instance}, its_method)) {
755 std::uint16_t its_max_segment_length;
756 std::uint32_t its_separation_time;
757 this->configuration_->get_tp_configuration(its_service, its_instance, its_method, true, its_max_segment_length,
758 its_separation_time);
759 send_segments(tp::tp::tp_split_message(_data, _size, its_max_segment_length), its_separation_time);
760 return endpoint_impl<Protocol>::cms_ret_e::MSG_WAS_SPLIT;
761 }
762 }
763 }
764 VSOMEIP_ERROR_P << "Dropping to big message (" << _size
765 << " Bytes). Maximum allowed message size is: " << endpoint_impl<Protocol>::max_message_size_ << " Bytes.";
766 return endpoint_impl<Protocol>::cms_ret_e::MSG_TOO_BIG;
767}
768
769template<typename Protocol>
770bool client_endpoint_impl<Protocol>::check_queue_limit(const uint8_t* _data, std::uint32_t _size) const {

Callers

nothing calls this directly

Calls 2

get_tp_configurationMethod · 0.80
get_instanceMethod · 0.45

Tested by

no test coverage detected