public abstract class AdsCommand extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AdsCommand.Cmd |
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMANDREQUEST |
private int |
idxcmd |
static int |
RESERVED |
| Modifier | Constructor and Description |
|---|---|
protected |
AdsCommand(int commandid) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFlag() |
abstract long |
getPayloadLength()
Returns the length of the payload for the command to send.
|
abstract AdsPayload |
parse(ByteBuffer full,
AdsHeader h)
Parses the reply payload.
|
AdsHeader |
prepareHeader(AdsSocketChannel io,
int id)
Prepares the header from static information in the ads socket channel,
our command code and the cycle id
|
abstract AdsPayload |
preparePayload(AdsSocketChannel io,
AdsHeader h)
Prepares the payload.
|
public static final int RESERVED
public static final int COMMANDREQUEST
private final int idxcmd
public int getFlag()
public abstract long getPayloadLength()
public AdsHeader prepareHeader(AdsSocketChannel io, int id)
io - id - public abstract AdsPayload preparePayload(AdsSocketChannel io, AdsHeader h)
public abstract AdsPayload parse(ByteBuffer full, AdsHeader h)