frog.plugin.spot
Class Message

java.lang.Object
  extended by frog.plugin.spot.Message

public class Message
extends Object

Helper class for sending messages to a Sun SPOT

Author:
Team Better Recognize

Field Summary
(package private)  byte index
          For adding filters, the index of the filter in the array
(package private)  short order
          The order for a resend message
(package private)  byte type
          The message to send
(package private)  String utf
          For adding filters, the parameter for the new filter
 
Constructor Summary
Message(byte type)
          Creates a message with just a single byte.
Message(byte type, byte index, String utf)
          Creates a message with a byte message and extra data.
Message(byte type, short order)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

final byte type
The message to send


order

final short order
The order for a resend message


index

final byte index
For adding filters, the index of the filter in the array


utf

final String utf
For adding filters, the parameter for the new filter

Constructor Detail

Message

public Message(byte type)
Creates a message with just a single byte. No extra payload data.

Parameters:
type - the message to send

Message

public Message(byte type,
               short order)

Message

public Message(byte type,
               byte index,
               String utf)
Creates a message with a byte message and extra data. This constructor would typically be used with a MSG_ADD_FILTER byte.

Parameters:
type - the message to send
index - for adding filters, the index of the filter in the array
utf - for adding filters, the parameter for the new filter