Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

STX/ETX Packet Protocol Library (stxetx.c)
[General Libraries]

 #include "stxetx.h" 
Overview
This library provides functions needed to transmit and receive STX/ETX packets over any interface which can send and receive bytes.  STX/ETX is a simple packet protocol for serial data streams and offers packetization, type tagging, and checksum protection for user data.  Common uses of STX/ETX might include radio communications were it can improve data reliability over lossy channels.  STX/ETX may also be used effectively anywhere multiple access to the communication medium is required.  The packets can be made to contain destination addresses or routing information as well as data.
STX/ETX Details
STX/ETX is a simple packet protocol that can be wrapped around user data for one or more of the following reasons: 1. packetization is needed
STX/ETX packets have the following structure:

[STX][status][type][length][user data...][checksum][ETX]

All fields are 1 byte except for user data which may be 0-255 bytes. Uppercase fields are constant (STX=0x02, ETX=0x03), lowercase fields vary. The length field is the number of bytes in the user data area. The checksum is the 8-bit sum of all bytes between but not including STX/ETX.


Generated on Tue Sep 20 03:11:45 2005 for Procyon AVRlib by  doxygen 1.4.2