| 349 | } |
| 350 | |
| 351 | option_impl* message_impl::deserialize_option(vsomeip_v3::deserializer* _from) { |
| 352 | option_impl* deserialized_option = 0; |
| 353 | uint8_t tmp_option_type; |
| 354 | |
| 355 | if (_from->look_ahead(2, tmp_option_type)) { |
| 356 | |
| 357 | option_type_e deserialized_option_type = static_cast<option_type_e>(tmp_option_type); |
| 358 | |
| 359 | switch (deserialized_option_type) { |
| 360 | |
| 361 | case option_type_e::CONFIGURATION: |
| 362 | deserialized_option = new configuration_option_impl; |
| 363 | break; |
| 364 | case option_type_e::LOAD_BALANCING: |
| 365 | deserialized_option = new load_balancing_option_impl; |
| 366 | break; |
| 367 | case option_type_e::PROTECTION: |
| 368 | deserialized_option = new protection_option_impl; |
| 369 | break; |
| 370 | case option_type_e::IP4_ENDPOINT: |
| 371 | case option_type_e::IP4_MULTICAST: |
| 372 | deserialized_option = new ipv4_option_impl; |
| 373 | break; |
| 374 | case option_type_e::IP6_ENDPOINT: |
| 375 | case option_type_e::IP6_MULTICAST: |
| 376 | deserialized_option = new ipv6_option_impl; |
| 377 | break; |
| 378 | case option_type_e::SELECTIVE: |
| 379 | deserialized_option = new selective_option_impl; |
| 380 | break; |
| 381 | |
| 382 | default: |
| 383 | deserialized_option = new unknown_option_impl(); |
| 384 | break; |
| 385 | }; |
| 386 | |
| 387 | // deserialize object |
| 388 | if (0 != deserialized_option && !deserialized_option->deserialize(_from)) { |
| 389 | delete deserialized_option; |
| 390 | deserialized_option = 0; |
| 391 | }; |
| 392 | } |
| 393 | |
| 394 | return deserialized_option; |
| 395 | } |
| 396 | |
| 397 | length_t message_impl::get_someip_length() const { |
| 398 | return header_.length_; |
nothing calls this directly
no test coverage detected