Back to USDT Commands
CMD_USDT_REGISTER
(previously CMD_CARD_IOCTL)

Command:             CMD_USDT_REGISTER
Destination:         SD_USDT
Destination Channel: Vehicle Network Protocol Channel ID

Description

Clients use this command to register or unregister with gusdt, the Unacknowledged Segmented Data Transfer protocol server. Once registered, a client is able to send FT_DATA messages to SD_USDT (gusdt) which, in turn, sends them to the desired channel.

By default, only the ID/Header 0101 (hexadecimal) is recognized as using Extended Addressing. USDT treats the data portion of a data message differently when using Extended Addressing than when not. If other and/or different IDs/Headers are to use Extended Addresses, they must be listed with either this command or the CMD_USDT_SET_EXTENDED command. The default ID/Header for Extended Addressing of 0101 is used only when the list of IDs/Headers using Extended Addressing is not present. If one or more IDs/Headers are present, only those in the list are recognized as using Extended Addressing.


Command Data Format

Action Transmit Options Receive Options Number of IDs/Headers to follow ID/Header using Extended Address ...
1 byte 1 byte 1 byte 1 byte 4 bytes ...
required optional
Number of IDs in the block First ID of USDT request block First ID of USDT response block First ID of UUDT response block    
4 bytes 4 bytes 4 bytes 4 bytes   16 bytes
USDT/UUDT block (optional) . . . USDT/UUDT block (optional)


Action

Bit 0 0 Unregister with gusdt.
1 Register with gusdt.
Bits 1 & 2 (Ignored if unregistering) 0 Use 11 bit IDs / Headers only.
1 Use 29 bit IDs / Headers only.
2 Use both 11 and 29 bit IDs / Headers.
Bits 3 thru 7 - reserved
Note:   Bit 0 is least significant bit; bit 7 is the most significant bit.


Transmit Options - Ignored if unregistering

Bit 0 0 Do not echo long transmitted messages back to the client.  (Those messages that require two or more segments to transmit. ie. longer than 6 or 7 bytes.)
1 Echo long transmitted messages back to the client.  (Those messages that require two or more segments to transmit. ie. longer than 6 or 7 bytes.);
Bits 1 & 2 0 Pad messages with less than 8 data bytes with 0x00's.
1 Pad messages with less than 8 data bytes with 0xFF's.
2 Do not pad messages
Bit 3 0 Do not send a USDT_DONE event when the last frame of a multi-frame USDT message is transmitted.
1 Send a USDT_DONE event when the last frame of a multi-frame USDT message is transmitted.
Bit 4 0 Do not echo short transmitted messages back to the client.  (Those messages that require only a single segment to transmit. ie. shorter than or equal to 6 or 7 bytes.)
1 Echo short transmitted messages back to the client.  (Those messages that require only a single segment to transmit. ie. shorter than or equal to 6 or 7 bytes.)
Bits 5 thru 7 - reserved
Notes:   Bit 0 is least significant bit; bit 7 is the most significant bit.
Timeout events for transmitted messages are always reported as they occur.


Receive Options - Ignored if unregistering

Bits 0 & 1 0 Do not verify the integrity of long received messages and do not send them to the client. Timeout and sequence error events for long received messages are not reported to the client.
1 Verify the integrity of long received messages and send them to the client. Timeout and sequence error events for long received messages are reported to the client as they occur.
2 Verify the integrity of long received messages but do not send them to the client. Timeout and sequence error events for long received messages are reported to the client as they occur.
Bit 2 0 Do not send a USDT_FIRSTFRAME event when the first frame of a multi-frame USDT message is received.
1 Send a USDT_FIRSTFRAME event when the first frame of a multi-frame USDT message is received.
Bit 3 0 Do not send a USDT_LASTFRAME event when the last frame of a multi-frame USDT message is received.
1 Send a USDT_LASTFRAME event when the last frame of a multi-frame USDT message is received.
Bits 4 thru 7 - reserved
Notes:   Bit 0 is least significant bit; bit 7 is the most significant bit.
Short (single frame) messages are always sent to the client.

Number of IDs/Headers using Extended Addressing - Ignored if unregistering

This is the number of IDs/Headers that follow. If set to zero, the standard ID/Header of 0101 (hexadecimal) is assumed to be the only one using Extended Addressing. If set to a non-zero value, only those IDs/Headers that follow are assumed to use Extended Addressing.

IDs/Headers (n) - n ranges from 0 to 255

Each 11 bit ID/Header to be used with extended addressing should appear in as a 4 byte value. The values should be right justified. For instance, to define the ID/Header of 0102 to use extended addressing, the four bytes should be set to 00 00 01 02 (hexadecimal). If more that one ID/Header is specified, the most common one or ones should appear first to insure maximum efficiency when handling the messages.

Note: Even though the IDs are stored as 4 byte values and it is possible to put 29 bit headers in the command, they will not be used as expected.


USDT/UUDT block IDs/Headers - Ignored if unregistering

If one or more of these optional sets are present, the two default blocks of 11 bit USDT/UUDT addresses built into gusdt are replaced by the one(s) described by these values. The first default block is defined as follows:
Number of 11 bit IDs/Headers in the block = 32
First 11 bit USDT request ID/Header = 0x0000 0240
First 11 bit USDT response ID/Header = 0x0000 0640
First 11 bit UUDT response ID/Header = 0x0000 0540
The second default block is defined as follows:
Number of IDs/Headers in the block = 8
First USDT request ID/Header = 0x0000 07E0
First USDT response ID/Header = 0x0000 07E8
First UUDT response ID/Header = 0x0000 05E8
If the number of IDs/Headers in any block is set to 0, all of the following blocks (including the second default block), if they exist, are effectively deleted. There can be up to 64 blocks of addresses.

Note: Even though the IDs are stored as 4 byte values and it is possible to put 29 bit headers in the command, they will not be used as expected.


Response Data Format

none


Response Return Codes

 
RESP_OK Execution of the command was successful. 
RESP_INVAL_CHAN The specified channel is invalid. 
RESP_MEM_ALLOC_ERR Could not allocate enough memory for data buffers. 
RESP_UNSUPPORTED This command is not supported on the specified channel. 
RESP_INVAL_LEN The number of bytes present for the extended addresses is incorrect according to the number of extended addresses in the third byte.  The last block of USDT addresses is less than 16 bytes long.  There are more than 64 blocks of USDT addresses.
RESP_UNKNOWN_ERR An unknown error occurred. 

|Top|