[Tinyos-2-commits]
CVS: tinyos-2.x/support/sdk/java/net/tinyos/packet
Packetizer.java, 1.6, 1.7
David Gay
idgay at users.sourceforge.net
Mon Aug 20 16:50:15 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/support/sdk/java/net/tinyos/packet
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19976
Modified Files:
Packetizer.java
Log Message:
reformat comment that got destroyed
Index: Packetizer.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/java/net/tinyos/packet/Packetizer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Packetizer.java 18 May 2007 18:53:24 -0000 1.6
--- Packetizer.java 20 Aug 2007 23:50:04 -0000 1.7
***************
*** 43,69 ****
public class Packetizer extends AbstractSource implements Runnable {
/*
! * Protocol inspired by, but not identical to, RFC 1663. There is currently no
! * protocol establishment phase, and a single byte ("packet type") to identify
! * the kind/target/etc of each packet.
*
* The protocol is really, really not aiming for high performance.
*
! * There is however a hook for future extensions: implementations are required
! * to answer all unknown packet types with a P_UNKNOWN packet.
*
! * To summarise the protocol: - the two sides (A & B) are connected by a
! * (potentially unreliable) byte stream - the two sides exchange packets
! * framed by 0x7e (SYNC_BYTE) bytes - each packet has the form <packet type>
! * <data bytes 1..n> <16-bit crc> where the crc (see net.tinyos.util.Crc)
! * covers the packet type and bytes 1..n - bytes can be escaped by preceding
! * them with 0x7d and their value xored with 0x20; 0x7d and 0x7e bytes must be
! * escaped, 0x00 - 0x1f and 0x80-0x9f may be optionally escaped - There are
! * currently 5 packet types: P_PACKET_NO_ACK: A user-packet, with no ack
! * required P_PACKET_ACK: A user-packet with a prefix byte, ack required. The
! * receiver must send a P_ACK packet with the prefix byte as its contents.
! * P_ACK: ack for a previous P_PACKET_ACK packet P_UNKNOWN: unknown packet
! * type received. On reception of an unknown packet type, the receicer must
! * send a P_UNKNOWN packet, the first byte must be the unknown packet type. -
! * Packets that are greater than a (private) MTU are silently dropped.
*/
final static boolean DEBUG = false;
--- 43,83 ----
public class Packetizer extends AbstractSource implements Runnable {
/*
! * Protocol inspired by, but not identical to, RFC 1663. There is
! * currently no protocol establishment phase, and a single byte
! * ("packet type") to identify the kind/target/etc of each packet.
*
* The protocol is really, really not aiming for high performance.
*
! * There is however a hook for future extensions: implementations
! * are required to answer all unknown packet types with a P_UNKNOWN
! * packet.
*
! * To summarise the protocol:
! * - the two sides (A & B) are connected by a (potentially
! * unreliable) byte stream
! *
! * - the two sides exchange packets framed by 0x7e (SYNC_BYTE) bytes
! *
! * - each packet has the form
! * <packet type> <data bytes 1..n> <16-bit crc>
! * where the crc (see net.tinyos.util.Crc) covers the packet type
! * and bytes 1..n
! *
! * - bytes can be escaped by preceding them with 0x7d and their
! * value xored with 0x20; 0x7d and 0x7e bytes must be escaped,
! * 0x00 - 0x1f and 0x80-0x9f may be optionally escaped
! *
! * - There are currently 5 packet types:
! * P_PACKET_NO_ACK: A user-packet, with no ack required
! * P_PACKET_ACK: A user-packet with a prefix byte, ack
! * required. The receiver must send a P_ACK packet with the
! * prefix byte as its contents.
! * P_ACK: ack for a previous P_PACKET_ACK packet
! * P_UNKNOWN: unknown packet type received. On reception of an
! * unknown packet type, the receicer must send a P_UNKNOWN packet,
! * the first byte must be the unknown packet type.
! *
! * - Packets that are greater than a (private) MTU are silently
! * dropped.
*/
final static boolean DEBUG = false;
More information about the Tinyos-2-commits
mailing list