当前位置:网站首页>1.someip introduction

1.someip introduction

2022-06-30 07:16:00 Delta-delta

SOME/IP It is an automobile middleware solution , Can be used for control news . It was designed from the beginning to perfectly adapt to devices of different sizes and operating systems . This includes small equipment , Like a camera 、AUTOSAR equipment , And the highest host or telematics equipment . It also ensures that SOME/IP Support the functions of infotainment domain and other domains in the vehicle , allow SOME/IP be used for MOST Alternative scenarios and more traditional CAN scene .

SOME/IP Support a wide range of middleware functions :

  • Serialization – transforming into and from on-wire representation.
  • Remote Procedure Call (RPC) and Messaging – Implement remote calls to functions and other messages .
  • Service Discovery (SD) – Dynamically find and function and configure its access .
  • Publish/Subscribe (Pub/Sub) – Dynamically configure what data is required and send it to the client .
  • Segmentation of UDP messages – Allowed to pass through UDP Transmit large SOME/IP Messages without segmentation .

Serialization

SOME/IP Serialization is designed to be very efficient ; That is, it uses the least RAM and CPU resources . This is achieved by using binary and non descriptive formats . Basically all parameters are written after each other . The format of the message and the memory representation of the message ( Packaging structure ) Very similar or identical in many cases .

SOME/IP The following basic data types can be serialized ( Data types are in network byte order by default / Big end coding , But it can also be encoded in small end ):

  • boolean: an 8bit field encoding False (0) or True (1). All other values are not allowed to be used.
  • uint8: unsigned integer with 8 bit size.
  • uint16: unsigned integer with 16 bit size.
  • uint32: unsigned integer with 32 bit size.
  • uint64: unsigned integer with 64 bit size.
  • sint8: signed integer with 8 bit size.
  • sint16: signed integer with 16 bit size.
  • sint32: signed integer with 32 bit size.
  • sint64: signed integer with 64 bit size.
  • float32: floating point numbers with 32 bit size.
  • float64: floating point numbers with 64 bit size.

SOME/IP You can serialize the following complex data types :

  • struct: a parameter that combines a predefined list of parameters. A struct can start with an optional length field counting all bytes of the struct following the length field.
  • string: fixed length or dynamic length character strings transporting ascii, UTF-8, or UTF-16 characters. For dynamic length strings, the string starts with a big-endian encoded length field counting the bytes the string characters use.
  • array: a parameter that contains a repetition of the same parameter type. This can be predefined number or dynamic number of parameters. For arrays with dynamic length a length field is used.
  • enumeration: an uint with the option of naming different values.
  • bitfield: 8, 16, or 32bit parameter, with each bit representing a boolean. Each boolean can have a name as well as a name for the True and False value each.
  • union: a parameter that can carry a parameter of a predefined parameter type, which is determined at the runtime. The serialization uses a length field, type field, and the data of the parameter.

The size of the length and type fields is 32 position ( Default ), It can be configured as 0、8、16 or 32 position . All length and type fields are in network byte order / Big end coding .

Remote Procedure Call (RPC) and Messaging

SOME/IP The service supports the following messages :

Request/Response Methods: Requests sent from the client to the server and responses sent from the server back to the client . Besides ,SOME/IP Allows error responses to be sent from the server back to the client , Instead of a regular response . This function can be used to implement different payload formats in error situations .

Fire and Forget Methods: Requests are sent from the client to the server .

Event: Events are sent from the server to the relevant client . Which client needs this event to pass SOME/IP-SD determine .

Field: A field can have an option notifier ( Events sent when looping or changing )、 An optional setter ( Request to update fields / Response method ) And an optional getter ( Request to read the current value / Response method ) In the field of .)

Proprietary extension to the SOME/IP serialization

SOME/IP Great flexibility has been supported in message serialization , For example, add parameters to the message or internal structure later .

Later AUTOSAR In the version , Proprietary extensions ( At first it was wrongly called TLV Expand ) Be added to SOME/IP in , To support greater flexibility . Basic parameters and / Or structure members can be represented as data ID And length indication as prefix . Although this reduces the efficiency of serialization , But it adds flexibility , For example, delete parameters from the message or reorder parameters later . To use this function ,API And applications also need to support this feature .

Due to limited flexibility and high overhead , This extension is currently not widely used .

please remember , Not all SOME/IP All implementations support this extension , Because it is not original SOME/IP Part of .

AUTOSAR support

SOME/IP Is the only known AUTOSAR 4.x Middleware in version :

AUTOSAR 4.0 – To what already exists SOME/IP Basic support for messages .
AUTOSAR 4.1 – Added right SOME/IP-SD And release / Subscription support .
AUTOSAR 4.2 – Added converters for serialization and other optimizations .
AUTOSAR 4.3 – Fixed some converter errors , Added a pair with SOME/IP-TP Large scale UDP Message support and SOME/IP-SD Optimize .

原网站

版权声明
本文为[Delta-delta]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202160545083638.html