📄 readme
字号:
Package: net.tinyos.packetDescription: Provides Java abstractions of TinyOS packets.Author: Philip Levis <pal@cs.berkeley.edu>This package allows application programmers to write a Packet classonce for their packet format, then use it in many different Javaapplications. Packets in this package use java.lang.reflect utilitiesto allow new packet formats to be easily incorporated into Javautilities. For example, a GUI can query a packet for its fields, thenuse the results to construct a display panel for it, instead ofwriting a new Panel each time a new Packet is written.For this functionality to work, fields in the Packet classrepresenting fields of the underlying binary packet must follow anaming convention; all names should be preceded by "packetField_". Inaddition, it is highly recommended that the protocol layer isspecified in the name. For example, "packetField_AM_dest" refers tothe ActiveMessage layer destintion field, while"packetField_BLESS_dest" refers to a BeaconLESS ad-hoc routingprotocol address. It is critical that one use the accessor/mutatormethods instead of directly modifying fields, as endian transformationissues could cause your packet to be corrupted.Executables: noneTest Programs: AMPacket, BLESSPacket, PacketPanelnet.tinyos.packet.AMPacket usage: java net.tinyos.packet.AMPacket descr: Tests packet marshalling and unmarshalling. Demonstrates use of packet classes.net.tinyos.packet.BLESSPacket usage: java.net.tinyos.packet.BLESSPacket descr: Tests packet marshalling and unmarshalling. Demonstrates use of packet classes.net.tinyos.packet.PacketPanel usage: java.net.tinyos.packet.PacketPanel descr: Shows what the PacketPanel looks like. Demonstrates how byte packets can be obtained.Classes:TOSPacket.javaThe base class for all packets. TOSPacket defines the length of apacket and provides the methods for modifying and querying packets, aswell a the methods defining the packet header and footer lengths, fromwhich data lengths are inferred.AMPacket.javaAn Active Message packet, as per those defined in MSG.h and used inAM.c of the TinyOS distribution.BLESSPacket.javaA BeaconLESS ad-hoc routing packet, as defined in bless_msg.h and usedin BLESS.c of the TinyOS distribution.ArrayPackerLE.javaProvides the translation between big and little endian necessary for Javato talk in binary to TinyOS.IllegalTypeException.javaException thrown when one calls the wrong set methods on packetfields. (e.g. trying to set a one byte field with setTwoByteField()).PacketPanel.javaGUI panel for entering packet data. Packet types are added as prototypeinstances of a packet class. Packets types can be cycled through byuse of a tabbed pane. The intention is for GUIs to be able toinclude it as is for building packets and turning them into byte arrays.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -