public abstract class PacketType
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.nio.ByteOrder |
be |
boolean |
done |
java.lang.Number[] |
downstream |
int |
idOfCommand |
protected int |
numberOfBytesPerValue |
int |
numValues |
static int |
packetSize |
boolean |
started |
java.lang.Number[] |
upstream |
| Constructor and Description |
|---|
PacketType(int id) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
command() |
abstract byte[] |
command(int idOfCommand,
java.lang.Number[] values) |
static int |
getId(byte[] bytes) |
void |
oneShotMode() |
abstract java.lang.Number[] |
parse(byte[] bytes) |
void |
pollingMode() |
boolean |
sendOk() |
void |
waitToSendMode() |
static void |
writeId(int idOfCommand,
byte[] bytes) |
public int idOfCommand
public java.lang.Number[] downstream
public java.lang.Number[] upstream
public boolean done
public boolean started
protected static java.nio.ByteOrder be
public static int packetSize
protected int numberOfBytesPerValue
public int numValues
public static int getId(byte[] bytes)
public static void writeId(int idOfCommand,
byte[] bytes)
public byte[] command()
public void oneShotMode()
public void waitToSendMode()
public void pollingMode()
public boolean sendOk()
public abstract java.lang.Number[] parse(byte[] bytes)
public abstract byte[] command(int idOfCommand,
java.lang.Number[] values)