The Session Data Transport protocol (SDT) is based upon the UDP (Universal Data Packet Protocol) protocol and has somewhat similar functionality than TCP but supports multicast traffic.
In SDT a session is a group of devices and consists of one single session leader (usually a lighting controller) and one or multiple session members (usually lighting fixtures). The session leader initiates communication by creating a new session and inviting lighting fixtures to join its session. Remember that there is only one session leader per session but lighting fixtures may be members of multiple sessions at a time. Usually the session leader will claim a multicast address to send messages to all devices belonging to its session although it is not forbidden that multiple session leaders share the same multicast address with multiple sessions. The SDT protocol within each device is responsible for filtering unwanted traffic.
Devices send their responses and acknowledgements to the unicast IP address of the session leader. In some rare cases one can also use a multicast address in the uplink path (e.g. for monitoring devices).
Step one. Create a session
In order to create a session, the session leader hast to obtain a valid multicast address. We already explained in the chapter about multicasting how this can be done. Then he has to find a unique session number. This is rather simple, as the session number must be unique with respect to the lighting controller only (or to be more precise: to his IP address) so he simply has to check, if there are some other session leader tasks running on the same lighting controller.
Afterwards he checks via SLP wether there are any lighting fixtures connected to the network. The lighting controller may then send ad-hoc messages to the desired devices and invites them to join his session. (These ad-hoc messages have to be sent to the unicast address of the lighting fixture, which is offered via SLP.)
The lighting fixtures may then join the session. It starts listening to the multicast port, which was offered by the session leader in the join message.
Step two. Listen to messages
All succeeding messages to the device belong to the group of reliable sequenced or unreliable sequenced messages. The group to which the message belongs is indicated in the message header. "Sequenced" means that the session leader assigns increasing numbers to each message before it is sent to the network. This enables the lighting controller to distinguish between older and newer messages. As the package routing delay in the network is unspecified, newer packages may arrive earlier at the lighting fixture than older ones. The message numbering scheme enables the fixture to distinguish between new and old packages. Messages arriving at their destination and having a lower sequence number than any other message received before are discarded. This ensures that the lighting fixture alway uses the most recent message data.
"Reliable Sequenced" goes one step further. The lighting fixture keeps track whether the whole sequence has been received properly. If a message arrives at the destination having a reliable sequence number which is larger than the last message reliable sequence number plus one, a reliable sequenced package has been lost on its way to the destination. The lighting fixture may send a not acknowledge message to the session leader and request retransmission. If a message has been lost during transmission, all session members which did not receive the message would send a NAK package. In order to reduce network traffic, E1.17 defines a complex backoff sequence to ensure, that not all session members have to NAK a lost message.
The session leader is responsible for keeping all reliable sequenced messages available for retransmisson. He may ask any session member to tell its reliable sequenced number up to which the member has processed reliable sequenced messages. Messages which have been processed by all session members may be safely discarded. If the session leader runs out of memory, he may also discard reliable sequenced packages which have not yet been processed by all session members. This may lead to a situation where lighting fixtures run out of sync, thus the sequence is no longer reliable.
Step three. Leaving a session
Any session member or the session leader may request to leave a session. If the session member desires to leave the session it sends a Leave Request Message to the Session leader whick ackknowledges the request by sending a Leave message to the member.