SOME/IP NPDU Manager

Overview

RAPIDSEA supports SOME/IP NPDU module. The SOME/IP NPDU (Network Protocol Data Unit) Manager module is responsible for efficient handling of SOME/IP message transmission and reception over UDP and TCP. It enables bundling of multiple SOME/IP messages into a single network packet and manages buffering, timeout, and transmission strategies. The SOME/IP NPDU Manager is designed to optimize network communication while ensuring reliable message delivery in accordance with the SOME/IP specification.

The below diagram captures the block level diagram of the SOME/IP NPDU manager and how it interfaces with other modules.

SOME/IP NPDU Block Diagram

Application Interface

The NPDU Manager ensures efficient communication by providing mechanisms for:

  • Aggregating multiple SOME/IP messages into a single NPDU for transmission.

  • Parsing multiple SOME/IP messages from a received NPDU.

  • Managing transmit and receive buffers.

  • Handling NPDU timeout and flush mechanisms.

  • Preventing buffer overflow through controlled transmission.

  • Supporting both UDP and TCP communication.

  • Maintaining message order within an NPDU.

The RAPIDSEA SOME/IP NPDU Manager module provides well-defined API functions that enable users to implement and integrate efficient message aggregation, buffer management, transmission, and parsing mechanisms.

The below table captures the function that are to be called from the application logic.

API Functions

Function

Description

someip_npdu_manager_init

To initializes the SOME/IP NPDU manager by setting up the NPDU information structures.

someip_npdu_message_handler

To handles SOME/IP NPDU messages by processing the message and updating the NPDU information structures.

someip_set_free_npdu_info

To set a SOME/IP NPDU information structure as free.

someip_npdu_clear

To clear SOME/IP NPDU information structures for a specific transport handle.

Implementation Guide

  1. Initialize the NPDU Manager information using someip_npdu_manager_init.

  2. Provide transmit messages to the NPDU Manager someip_npdu_message_handler.

  3. Store and aggregate messages in the transmit buffer in NPDU information.

  4. Trigger transmission based on buffer condition or timeout.

  5. Receive NPDU packets from the network layer.

  6. Parse and extract individual SOME/IP messages.

  7. Forward messages to the appropriate upper-layer modules.

  8. Reset buffers after processing using someip_set_free_npdu_info.

Note

If the NPDU information structure is not configured (NULL) or the number of NPDU information entries is zero, the system shall bypass NPDU processing. In such cases, message transmission and reception shall proceed using standard SOME/IP communication without message aggregation or NPDU-based handling.

Transmission

The SOME/IP NPDU Manager handles outgoing SOME/IP messages from both server and client modules by buffering and optionally bundling them into a single packet.

  • Incoming transmit messages shall be stored in the NPDU transmit buffer.

  • Multiple messages shall be concatenated into a single NPDU based on:
    • Destination IP address

    • Destination port

    • Communication type (UDP/TCP, unicast/multicast)

  • The NPDU Manager shall trigger transmission when:
    • The buffer reaches its maximum capacity

    • A configured timeout expires

    • The transmit message length more than the NPDU limit.

  • If a new message cannot fit into the buffer:

  • The existing buffer content shall be transmitted

  • The buffer shall be reset

  • The new message shall be stored in the cleared buffer

Note

If the transmit message length equal to the NPDU maximum limit, the message shall bypass NPDU buffering and be sent directly using someip_****_pdu_write.

Reception

The NPDU Manager processes incoming network packets containing one or more SOME/IP messages.

Upon receiving an NPDU, the module shall:
  • Iterate through the packet using the SOME/IP length field

  • Extract each SOME/IP message sequentially

  • Validate message boundaries

Each extracted message shall be:
  • Forwarded to the appropriate upper-layer handler

  • Processed independently of other messages in the same NPDU

SOME/IP Server Transmission and Reception using NPDU

Server handles:
  • Responses

  • Notifications (event messages)

Server supports bundling of:
  • Multiple responses

  • Responses + notifications

The below block diagram captures the SOMEIP/IP Server Transmission using NPDU

SOME/IP Server transmission with NPDU

The below block diagram captures the SOMEIP/IP Server Reception using NPDU

SOME/IP Server reception with NPDU

The below sequence diagram captures the SOMEIP/IP Server Transmission and Reception with NPDU

SOME/IP server transmission and reception flow diagram with NPDU

SOME/IP Client Transmission and Reception using NPDU

Client handles:
  • Requests

Client supports bundling of:
  • Multiple requests

The below block diagram captures the SOMEIP/IP Client Transmission using NPDU

SOME/IP Client transmission with NPDU

The below block diagram captures the SOMEIP/IP Client Reception using NPDU

SOME/IP Client reception with NPDU

The below sequence diagram captures the SOMEIP/IP Client Transmission and Reception with NPDU

SOME/IP Client transmission and reception flow diagram with NPDU

Note

When multiple SOME/IP messages are received as concatenated data over TCP, the internal mechanisms shall parse, validate, and reframe them into individual messages.

Dependency

This stack depends on the below RAPIDSEA interfaces that can be obtained or custom implemented.

SOME/IP NPDU Header Details

Documentation from the relevant header as follows:

Warning

doxygenfile: Cannot find file “someip_npdu_common.h