Back to USDT Commands
USDT Overview

The USDT layer is implemented as a program (gusdt) with which client programs can send and receive FT_DATA CAN messages containing more than eight bytes of data. A registered client sends long CAN messages to a card (channel) by setting the Destination and Destination Channel in the frame header of an FT_DATA message to SD_USDT and the Channel ID respectively.

All FT_DATA messages sent to gusdt from a client are examined to see how many data bytes are present.


When a client registers with gusdt using the CMD_USDT_REGISTER command, the following steps are performed:


The registration process allows gusdt to handle multiple clients communicating with different channels simultaneously. Multiple clients can send USDT messages to the same channel simultaneously as well. However, only one client at a time may send or receive USDT messages from a given address on a channel.

When a client unregisters with gusdt (CMD_USDT_REGISTER), the following steps are performed:


The filtering set up when a client registers using the default ranges allows CAN messages (USDT responses) from a channel to be seen by gusdt if and only if


FT_DATA messages from the CAN channels that are allowed through the filters are processed as follows.

A flow status (FS) message (PCI upper nybble of 3) is sent by the remote node after the first packet sent by gusdt and whenever the number of packets sent after the previous FS is equal to the initial block size (BS). Gusdt waits for each expected FS and will abandon the attempt to send the message when an FS message does not arrive.  If the wait flag, present in the lower nybble of FS, is set, gusdt waits for up to 2 seconds for another command from the remote node before abandoning the attempt.  The separation time (ST) of the first FS messages is saved and used to time the next and all following messages sent out to that remote node. Due to the limitations of the task scheduler, the actual time between packets may be greater than, but never less than that requested.

An incoming USDT message is recognized by its first frame (FF) PCI byte.  Upon reception of the first frame, a USDT_EVENT with a data byte of USDT_FIRSTFRAME may be sent to the registered client. After the incoming USDT message has been assembled in the input buffer, it is sent to the registered client if that client registered with the assemble option set.  Gusdt sends out a FS message saying that it will not use any further FS frames and that it doesn't need any delay between packets.  If gusdt detects a sequence error, a single event (FT_EVENT) message (USDT_EVENT with a data byte of USDT_SEQUENCE) is sent to the registered client if the assemble flag was set.  If too much time passes between two consecutive frames (CF), an event (FT_EVENT) message (USDT_EVENT with a data byte of USDT_TIMEOUT) is sent to the registered client if the assemble flag was set.  All consecutive frame (CF) messages following either error are silently discarded until another first frame (FF) arrives.


 

Format of USDT Messages Sent To gusdt By a Client

The Frame Header remains the same with the exception of data length which may be up to 4113 allowing up to 4095 bytes of CAN data.

The Data Header remains the same with the exception of data length which may be up to 4095.

The CAN Header contains the address of the CAN node to which the data is to be sent.  The address in the header is used unchanged for data transmission.

The CAN Data consists of 1 through 4095 bytes of data.  Gusdt prepends a PCI byte to the data before sending the data.  If 7 or fewer data bytes are present, a single CAN packet is sent.  If more than 7 bytes of data are present, the USDT protocol is used to transmit multiple CAN packets.

A default CAN header (ID) of 0101 signals the use of extended addressing. Extended addressing may be inplemented for other IDs by specifying them in the configuration command.
 
 

Format of USDT Messages Received From CAN By gusdt

Gusdt assembles incoming CAN packets with an CAN ID between 0640 and 065F or 07E8 through 07EF.  After the last packet of a message arrives, a single Data Message is sent to the registered client.  The format of the message is identical to that of the message from the client. The ID ranges may be changed during USDT registration.
|Top|