210 likes | 447 Views
SDP 2.0. System Data Protocol. Overview. What is SDP? Provider/Subscriber Pattern SDP Components– Part 1 SDP Simple Usage SDP Messaging SDP Components– Part 2 SDP Messaging. What is SDP?. System Data Protocol (SDP) is a bidirectional message protocol for transmitting dynamic data.
E N D
SDP 2.0 System Data Protocol
Overview • What is SDP? • Provider/Subscriber Pattern • SDP Components– Part 1 • SDP Simple Usage • SDP Messaging • SDP Components– Part 2 • SDP Messaging
What is SDP? • System Data Protocol (SDP) is a bidirectional message protocol for transmitting dynamic data. • SDP uses a subscription mechanism allowing the right data to be sent at the right time (reduces bandwith). • SDP messaging allows many-to-many (peer to peer) communication.
Provider/Subscriber Pattern • The provider/subscriber pattern defines a one-to-many, unidirectional flow of information. • The provider has information or events that need to be communicated to other objects, its subscribers. Subscriber Subscriber Provider Subscriber
SDP Components – Part 1 • SDP Provider • SDP Subscriber
SDP Provider • The SDP Providerwaits for subscribe messages. • Once a subscription has been accepted, the provider starts sending data messages to its client. • When the client no longer requires the data it sends an unsubscribe message, the provider stops sending data messages. SDP Provider subscribe/unsubscribe/request/query data/acknowledge/revoke/provide
SDP Subscriber • The SDP subscriber sends out subcribe messages when it requires data of a specific type (each data type has a unique ID). • The SDP subscriber consumes (uses) the arriving data. SDP Subscriber data/acknowledge/revoke/provide subscribe/unsubscribe/request/query
SDP Simple Usage Provider Subscriber subscribe/unsubscribe/request/query data/acknowledge/revoke/provide
SDP Message Types Subscriber Messages • subscribe = 0 • unsubscribe = 1 • request-data = 2 • provide-query = 3 Provider Messages • acknowledge = 4 • revoke = 5 • data = 6 • provide = 7 (range 0-7 requires 3 bits of information, this is the first part of the SDP message header)
Packed / Unpacked Messages • For increased efficiency, two different message strategies are allowed between SDP components: • Unpacked Messages (objects): Send objects around (pointer to struct containing data fields). Used internally within the same executable. • Packed Messages (serialized data): Send byte arrays containing a serialized version of the message. Used between executables (network, data links etc.)
Messaging Example - SDP on CAN • Only a single CAN frame is required for transmitting data values up to 32 bits in length (uint8, uint16, uint32). • Using ISO-TP as the default CAN transport protocol allows data values up to 4095 bytes to be sent. ISO-TP header (1 byte): Single Frame (SF), data-length= 7 SDP header (3 bytes): message-type = data, data-ID = 0x0101 Data Value (4 bytes): uint32 value = 0x1234
SDP Components – Part 2 • SDP Gateway • SDP Router
SDP Gateway • An SDP gateway routes data between an SDP network and some other data format and/or network. • A gateway (usually) has both a provider and subscriber sub-component (as seen below). subscribe/unsubscribe/request/query data/acknowledge/revoke/provide Subscriber Provider SDP Gateway other data format or network
SDP Gateway – Examples Subscriber Provider Subscriber Provider Subscriber Provider SDP Gateway SDP Gateway SDP Gateway Serial Link send/recv ISO-TP transmit/recv CAN signal read/write Serial Link CAN Bus Subscriber Provider Subscriber Provider Subscriber Provider SDP Gateway SDP Gateway SDP Gateway GX Engine HFAL* signal read/write socket send/recv Graphics Engine RTE TCP/IP *) HFAL: HMI Framework Adaptation Layer
SDP Gateway - Benefits • Each gateway can be designed, implemented and tested in isolation. • Standardized communication method in one end (SDP messaging). • High reusability: gateways can be connected in many different configurations. • Follows the Unix philosphy: ”Do one one thing and do it well.”
SDP Router • Providers, subscribers and gateways can be connected together to form networks. • The SDP router allows SDP messages to flow between SDP components with low latency. • Routing tables are by default dynamically maintained (just plug in your components). SDP Router ... Provider Subscriber Provider Subscriber Provider Subscriber Subscriber Provider Subscriber Provider Gateway other data format
Example Network 1 Application Software 2 (ECU 2) Application Software 1 (ECU 1) Router Router Subscriber Subscriber Gateway Subscriber Gateway Provider CAN Bus
Example Network 2 Vehicle Processor Graphics Processor Router Router Gateway Gateway Gateway Gateway Graphics Engine RTE Signals Serial Link
Network 2 without router (optimization) Vehicle Processor Graphics Processor Graphics Engine RCCL / RTE GX Engine HFAL signal read/write Gateway Gateway Provider Subscriber Provider Subscriber Subscriber Provider Subscriber Provider Gateway Gateway serial link send/recv serial link send/recv Serial Link Serial Link