One is a FT_CMD command frame using the CMD_CARD_TX command; the other is by sending a FT_DATA message. The difference is that the FT_CMD command sends a command response back to the client immediately on receipt of the command; FT_DATA messages are not acknowleged until a transmit loopback occurs (if tx loopback is enabled).
The following example frames cover both methods. An example frame with 3 header and 5 data bytes will be sent (header = 0x01 0x02 0x03, data = 0x44,0x55,0x66,0x77,0x88). Channel 3 is used in this example.
See http://www.dgtech.com/gryphon/docs/html/GCprotocol/client_howto/GCframeformat.html "Gryphon Communication Protocol: Client How to" for details about the GC Protocol frame structures and usage.
FT_DATA message type method: Frame Header: field name offset value ------------------------------------------------------------------------- source 0 SD_CLIENT source channel 1 (client ID assigned during registration) destination 2 SD_CARD dest. channel 3 3 (channel # to transmit on) data length 4,5 0,28 (Length of the FT_DATA section) frame type 6 FT_DATA reserved 7 0 Frame Body (FT_DATA): field name offset value ------------------------------------------------------------------------- Header length 8 3 (3 byte header) Header bits 9 24 (3 byte header) Data length 10,11 0,5 (5 data bytes in this example) Extra length 12 0 Mode 13 MODE_TX Priority 14 0 (ignored for tx frames) Status 15 0 (ignored for tx frames) Timestamp 16-19 0,0,0,0 (ignored for tx frames) Context 20 0 Reserved 21-23 0,0,0 (Class II frame data:) J1850 header 24-26 0x01,0x02,0x03 J1850 data 27-31 0x44,0x55,0x66,0x77,0x88 Note that in this case the frame length is an even multiple of 4. If this was not the case, it would be padded to a multiple of 4 by adding zeros to the end of it. CMD_CARD_TX method: Frame Header: field name offset value ------------------------------------------------------------------------- source 0 SD_CLIENT source channel 1 (client ID assigned during registration) destination 2 SD_CARD dest. channel 3 3 (channel # to transmit on) data length 4,5 0,24 (Length of the FT_DATA section) frame type 6 FT_CMD reserved 7 0 FT_CMD command header: field name offset value ------------------------------------------------------------------------- command 8 CMD_CARD_TX context 9 0 reserved 10,11 0,0 Command data (FT_DATA structure encapsulated in FT_CMD data field): field name offset value ------------------------------------------------------------------------- Header length 12 3 (3 byte header) Header bits 13 24 (3 byte header) Data length 14,15 0,5 (5 data bytes in this example) Extra length 16 0 Mode 17 MODE_TX Priority 18 0 (ignored for tx frames) Status 19 0 (ignored for tx frames) Timestamp 20-23 0,0,0,0 (ignored for tx frames) Context 24 0 Reserved 25-27 0,0,0 (Class II data:) 1850 header 28-30 0x01,0x02,0x03 1850 data 31-35 0x44,0x55,0x66,0x77,0x88When using the FT_CMD method, you'll receive a FT_RESP response frame back from the server right away, and possibly a FT_DATA frame when the frame actually gets transmitted (if you have tx loopback turned on).
This document was obtained from:
Dearborn Group, Inc.
(248) 488-2080
dg@dgtech.com
http://www.dgtech.com
Copyright © 2003 Dearborn Group Inc.