pt.citar.diablu.nxt.brick
Class NXTMsgBox

java.lang.Object
  extended by pt.citar.diablu.nxt.brick.NXTMsgBox

public class NXTMsgBox
extends Object

Author:
Anton Vanhoucke, Dave Musicant

Constructor Summary
NXTMsgBox(NXTBrick brick)
          Creates a new instance of NXTMsgBox associated with a NXTBrick
 
Method Summary
 String receiveMsg(int mailbox, boolean remove)
          Receives a message from the brick.
 boolean sendMsg(int mailbox, String message)
          Sends a message to the brick.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTMsgBox

public NXTMsgBox(NXTBrick brick)
Creates a new instance of NXTMsgBox associated with a NXTBrick

Parameters:
brick - The NXTBrick instance.
Method Detail

sendMsg

public boolean sendMsg(int mailbox,
                       String message)
Sends a message to the brick.

Parameters:
mailbox - Int mailbox number
message - String message
Returns:
True if no error; False on error.

receiveMsg

public String receiveMsg(int mailbox,
                         boolean remove)
Receives a message from the brick.

Parameters:
mailbox - Int mailbox number
remove - Boolean; true clears message from remote inbox
Returns:
String message


Processing library NXTComm by Jorge C. S. Cardoso. (c) 2014