public class LCP
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addMessageListener(LCPMessageListener aListener)
Add a listener for incoming LCP messages.
|
static int |
emulateCommand(byte[] cmd,
int cmdLen,
byte[] reply)
Emulates a Lego firmware Direct or System command
|
static void |
messageWrite(int mailbox,
java.lang.String msg)
Write a message to a remote inbox
|
static void |
setMenuVersion(int version,
int revision)
Store the menu version and revision
|
static void |
updateMsg(int mailbox,
java.lang.String key,
java.lang.String msg)
Update a message in the inbox, or add a new one if no match
|
public static final byte DIRECT_COMMAND_REPLY
public static final byte SYSTEM_COMMAND_REPLY
public static final byte REPLY_COMMAND
public static final byte DIRECT_COMMAND_NOREPLY
public static final byte SYSTEM_COMMAND_NOREPLY
public static final byte START_PROGRAM
public static final byte STOP_PROGRAM
public static final byte PLAY_SOUND_FILE
public static final byte PLAY_TONE
public static final byte SET_OUTPUT_STATE
public static final byte SET_INPUT_MODE
public static final byte GET_OUTPUT_STATE
public static final byte GET_INPUT_VALUES
public static final byte RESET_SCALED_INPUT_VALUE
public static final byte MESSAGE_WRITE
public static final byte RESET_MOTOR_POSITION
public static final byte GET_BATTERY_LEVEL
public static final byte STOP_SOUND_PLAYBACK
public static final byte KEEP_ALIVE
public static final byte LS_GET_STATUS
public static final byte LS_WRITE
public static final byte LS_READ
public static final byte GET_CURRENT_PROGRAM_NAME
public static final byte MESSAGE_READ
public static final byte NXJ_DISCONNECT
public static final byte NXJ_DEFRAG
public static final byte NXJ_SET_DEFAULT_PROGRAM
public static final byte NXJ_SET_SLEEP_TIME
public static final byte NXJ_SET_VOLUME
public static final byte NXJ_SET_KEY_CLICK_VOLUME
public static final byte NXJ_SET_AUTO_RUN
public static final byte NXJ_GET_VERSION
public static final byte NXJ_GET_DEFAULT_PROGRAM
public static final byte NXJ_GET_SLEEP_TIME
public static final byte NXJ_GET_VOLUME
public static final byte NXJ_GET_KEY_CLICK_VOLUME
public static final byte NXJ_GET_AUTO_RUN
public static final byte OPEN_READ
public static final byte OPEN_WRITE
public static final byte READ
public static final byte WRITE
public static final byte CLOSE
public static final byte DELETE
public static final byte FIND_FIRST
public static final byte FIND_NEXT
public static final byte GET_FIRMWARE_VERSION
public static final byte OPEN_WRITE_LINEAR
public static final byte OPEN_READ_LINEAR
public static final byte OPEN_WRITE_DATA
public static final byte OPEN_APPEND_DATA
public static final byte BOOT
public static final byte SET_BRICK_NAME
public static final byte GET_DEVICE_INFO
public static final byte DELETE_USER_FLASH
public static final byte POLL_LENGTH
public static final byte POLL
public static final byte NXJ_PACKET_MODE
public static void addMessageListener(LCPMessageListener aListener)
aListener
- the LCP message listenerpublic static int emulateCommand(byte[] cmd, int cmdLen, byte[] reply)
cmd
- the buffer containing the commandcmdLen
- the length of the commandpublic static void messageWrite(int mailbox, java.lang.String msg)
mailbox
- the remote inboxmsg
- the messagepublic static void updateMsg(int mailbox, java.lang.String key, java.lang.String msg)
mailbox
- the remote mail boxkey
- an initial prefix of the stringmsg
- the new messagepublic static void setMenuVersion(int version, int revision)
version
- the menu version numberrevision
- the menu revision number