org.avineas.comli.impl
public class AddressContents extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
HEADERSIZE |
Constructor and Description |
---|
AddressContents(byte[] contents)
Equivalent of
constructor using
parameters equal to 0 and the size of the passed contents. |
AddressContents(byte[] contents,
int offset,
int size)
Construct an address contents object from a received data buffer.
|
AddressContents(int address,
int cnt)
Construct an address contents block with a start address and a
quantity.
|
Modifier and Type | Method and Description |
---|---|
int |
getAddress() |
byte[] |
getBytes()
Get this object as byte array to be included in a COMLI packet.
|
int |
getCount() |
byte[] |
getData() |
void |
setAddress(int address) |
void |
setCount(int cnt) |
void |
setData(byte[] data,
int offset,
int size) |
public static final int HEADERSIZE
public AddressContents(byte[] contents, int offset, int size)
contents
- The received contents of a packetoffset
- The offset within the buffer to usesize
- The size of the buffer to usepublic AddressContents(byte[] contents)
constructor
using
parameters equal to 0 and the size of the passed contents.contents
- The contents of the packetspublic AddressContents(int address, int cnt)
address
- The start addresscnt
- The quantity in the packetpublic int getAddress()
public void setAddress(int address)
public int getCount()
public void setCount(int cnt)
public void setData(byte[] data, int offset, int size)
public byte[] getData()
public byte[] getBytes()