Transcript SDP 2_0x
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-tomany, unidirectional flow of information.
• The provider has information or events that need
to be communicated to other objects, its
subscribers.
Subscriber
Provider
Subscriber
Subscriber
SDP Components – Part 1
• SDP Provider
• SDP Subscriber
SDP Provider
• The SDP Provider waits for
subscribe messages.
• Once a subscription has
been accepted, the
provider starts sending
data messages to its
subscribe/unsubscribe/request/query
client.
data/acknowledge/revoke/provide
• When the client no longer
requires the data it sends
an unsubscribe message,
the provider stops sending
data messages.
SDP Provider
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
Subscriber
subscribe/unsubscribe/request/query
data/acknowledge/revoke/provide
Provider
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
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
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
Subscriber
Provider
Provider
Subscriber
Provider
SDP Gateway
SDP Gateway
SDP Gateway
CAN signal read/write
ISO-TP transmit/recv
Serial Link send/recv
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
Provider
Subscriber
Subscriber
Provider
Gateway
other data format
...
Provider
Subscriber
Subscriber
Example Network 1
Application Software 1
(ECU 1)
Application Software 2
(ECU 2)
Router
Router
Subscriber
Subscriber
Gateway
Gateway
CAN Bus
Subscriber
Provider
Example Network 2
Vehicle Processor
Graphics Processor
Router
Gateway
Router
Gateway
Gateway
Gateway
Graphics Engine
RTE Signals
Serial Link
Network 2 without router
(optimization)
Vehicle Processor
Graphics Processor
RCCL / RTE
Graphics Engine
signal read/write
Gateway
Provider
Subscriber
Subscriber
Provider
GX Engine HFAL
Gateway
Provider
Subscriber
Subscriber
Provider
Gateway
Gateway
serial link send/recv
serial link send/recv
Serial Link
Serial Link