AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.Ev3BinaryParser Class Reference

Static Public Member Functions

static byte[] pack (String format, Object... values) throws IllegalArgumentException
 
static Object[] unpack (String format, byte[] bytes) throws IllegalArgumentException
 
static byte[] encodeLC0 (byte v)
 
static byte[] encodeLC1 (byte v)
 
static byte[] encodeLC2 (short v)
 
static byte[] encodeLC4 (int v)
 
static byte[] encodeLV0 (int i)
 
static byte[] encodeLV1 (int i)
 
static byte[] encodeLV2 (int i)
 
static byte[] encodeLV4 (int i)
 
static byte[] encodeGV0 (int i)
 
static byte[] encodeGV1 (int i)
 
static byte[] encodeGV2 (int i)
 
static byte[] encodeGV4 (int i)
 
static byte[] encodeSystemCommand (byte command, boolean needReply, Object... parameters)
 
static byte[] encodeDirectCommand (byte opcode, boolean needReply, int globalAllocation, int localAllocation, String paramFormat, Object... parameters)
 

Detailed Description

The class provides utility functions to encode and decode commands that are sent to or received from LEGO MINDSTORMS EV3 robots.

Author
jerry.nosp@m.7320.nosp@m.4@gma.nosp@m.il.c.nosp@m.om (jerry73204)
spade.nosp@m.d065.nosp@m.43@gm.nosp@m.ail..nosp@m.com (Alvin Chang)

Definition at line 21 of file Ev3BinaryParser.java.

Member Function Documentation

◆ encodeDirectCommand()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeDirectCommand ( byte  opcode,
boolean  needReply,
int  globalAllocation,
int  localAllocation,
String  paramFormat,
Object...  parameters 
)
static

Definition at line 506 of file Ev3BinaryParser.java.

◆ encodeGV0()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeGV0 ( int  i)
static

Definition at line 437 of file Ev3BinaryParser.java.

◆ encodeGV1()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeGV1 ( int  i)
static

Definition at line 441 of file Ev3BinaryParser.java.

◆ encodeGV2()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeGV2 ( int  i)
static

Definition at line 446 of file Ev3BinaryParser.java.

◆ encodeGV4()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeGV4 ( int  i)
static

Definition at line 452 of file Ev3BinaryParser.java.

◆ encodeLC0()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLC0 ( byte  v)
static

Definition at line 387 of file Ev3BinaryParser.java.

◆ encodeLC1()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLC1 ( byte  v)
static

Definition at line 394 of file Ev3BinaryParser.java.

◆ encodeLC2()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLC2 ( short  v)
static

Definition at line 399 of file Ev3BinaryParser.java.

◆ encodeLC4()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLC4 ( int  v)
static

Definition at line 405 of file Ev3BinaryParser.java.

◆ encodeLV0()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLV0 ( int  i)
static

Definition at line 414 of file Ev3BinaryParser.java.

◆ encodeLV1()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLV1 ( int  i)
static

Definition at line 418 of file Ev3BinaryParser.java.

◆ encodeLV2()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLV2 ( int  i)
static

Definition at line 423 of file Ev3BinaryParser.java.

◆ encodeLV4()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeLV4 ( int  i)
static

Definition at line 429 of file Ev3BinaryParser.java.

◆ encodeSystemCommand()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.encodeSystemCommand ( byte  command,
boolean  needReply,
Object...  parameters 
)
static

Definition at line 461 of file Ev3BinaryParser.java.

◆ pack()

static byte [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.pack ( String  format,
Object...  values 
) throws IllegalArgumentException
static

Definition at line 54 of file Ev3BinaryParser.java.

◆ unpack()

static Object [] com.google.appinventor.components.runtime.util.Ev3BinaryParser.unpack ( String  format,
byte[]  bytes 
) throws IllegalArgumentException
static

Definition at line 261 of file Ev3BinaryParser.java.


The documentation for this class was generated from the following file: