|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rtpi.packets.RtpiDataPacket
This class represents an RTP/I data packet.
Field Summary | |
static int |
DELTA_STATE
DELTA_STATE ADU type. |
static int |
EVENT
EVENT ADU type. |
static int |
HEADER_SIZE
The RTP/I header size. |
static int |
ILLEGAL_PAYLOAD_TYPE
Illegal value for the payload type field. |
static int |
ILLEGAL_RELIABILITY_TYPE
Illegal value for the reliability mapping. |
static int |
ILLEGAL_TYPE
ILLEGAL ADU type. |
static int |
NO_RELIABILITY
Reliability mapping ID for unreliable transmission. |
static int |
RELIABLE_TRANSPORT
Reliability mapping ID for transprent transport level reliability (such as TCP). |
static int |
STATE
STATE ADU type. |
static int |
STATE_QUERY
STATE_QUERY ADU type. |
static int |
VERSION
The protocol version number. |
Constructor Summary | |
RtpiDataPacket(byte[] transportPacket,
int start)
This creates ab RtpiDataPacket from an incoming packet. |
|
RtpiDataPacket(byte[] data,
int begin,
int size)
This creates a new RtpiDataPacket that is to be transmitted over the network. |
Method Summary | |
void |
deleteReliabilityHeader()
This deletes the reliability header of a packet. |
void |
flush()
This flushes a packet. |
int |
flushToArray(byte[] destination,
int start)
|
int |
getEnd()
This returns the value of this packets end bit. |
int |
getExtension()
This returns the value of the extension bit. |
int |
getFragmentCount()
This gets the fragment count of this packet. |
int |
getLength()
This gets the length field of the packet. |
byte[] |
getPacketData()
This gets the raw bytes of the encoded packet. |
int |
getParticipantID()
This gets the participant ID of this packets sender. |
int |
getPayloadLength()
This returns the length of the payload in bytes. |
int |
getPayloadStart()
This returns the position of the first byte of this packet's payload. |
int |
getPayloadType()
This returns the payload type of the packet. |
int |
getPriority()
This gets the priority of the packet. |
byte |
getProfileInformation()
This gets the profile specific information contained in this packet. |
byte[] |
getReliabilityHeader()
This returns the reliability header. |
int |
getReliabilityHeaderLength()
This returns the length of the reliability header in multiples of four bytes. |
byte[] |
getReliabilityInformation()
This gets the reliability specific information contained in the packet. |
int |
getReliabilityType()
This returns the reliability type of the packet. |
int |
getSequenceNumber()
This returns the sequence number of the ADU this packet belongs to. |
long |
getSubcomponentID()
This gets the subcomponent ID of the subcomponent this packet refers to. |
long |
getTimestamp()
This returns the timestamp of this packet. |
int |
getType()
This returns the ADU type of the packet. |
int |
getVersion()
This returns the protocol version of the packet. |
void |
parse()
This parses a packet. |
void |
setEnd(int e)
This sets the value of the end bit for this packet. |
void |
setExtension(int e)
This sets the value of the extension bit for this packet. |
void |
setFragmentCount(int fc)
Thist sets the fragment count of this packet. |
void |
setParticipantID(int pid)
This sets the participant ID of this packet. |
void |
setPayloadType(int pt)
This sets the payload type for the packet. |
void |
setPriority(int p)
This sets the priority of the packet. |
void |
setProfileInformation(byte pi)
This sets the profile specific information for this packet. |
void |
setReliabilityHeader(byte[] header)
This sets the reliablity extension header. |
void |
setReliabilityInformation(byte b0,
byte b1)
This sets the reliability specific information for this packet. |
void |
setReliabilityType(int rt)
This sets the reliability type of the packet. |
void |
setSequenceNumber(int nr)
This sets the sequence number of the packet. |
void |
setSubcomponentID(long subID)
This sets the subcomponent ID for this packet. |
void |
setTimestamp(long ts)
This sets the timestamp of this packet. |
void |
setType(int t)
This sets the ADU type for this packet. |
java.lang.String |
toString()
Print this object to a String. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int HEADER_SIZE
public static final int VERSION
public static final int EVENT
public static final int STATE
public static final int DELTA_STATE
public static final int STATE_QUERY
public static final int ILLEGAL_TYPE
public static final int NO_RELIABILITY
public static final int RELIABLE_TRANSPORT
public static final int ILLEGAL_RELIABILITY_TYPE
public static final int ILLEGAL_PAYLOAD_TYPE
Constructor Detail |
public RtpiDataPacket(byte[] transportPacket, int start)
transportPacket
- The transport packet that has been received.start
- The start of the RtpiDataPacket within the transport packet.
This identifies the position of the first byte of the header
of this RtpiDataPacket in the transportPacket. It must be
in the range between 0 and transportPacket.length.public RtpiDataPacket(byte[] data, int begin, int size)
rtpiDataPacket
- The payload data.start
- The start of the payload data in the byte array. Ideally this should
be identical to the sum of RTP/I header and reliability header. Then
the header can be prepended to tha payload without copy operation.size
- The size of the payload data in the data array.Method Detail |
public int getPayloadStart()
public int getPayloadLength()
public int getVersion()
public int getEnd()
public void setEnd(int e)
e
- The end bit.public int getExtension()
public void setExtension(int e)
e
- The value of the extension bit.public int getType()
public void setType(int t)
t
- The ADU type (e.g. STATE or EVENT).public int getPayloadType()
public void setPayloadType(int pt)
pt
- The payload type.public int getLength()
public int getReliabilityType()
public void setReliabilityType(int rt)
rt
- The reliability Type.public int getPriority()
public void setPriority(int p)
The
- Priority.public byte getProfileInformation()
public void setProfileInformation(byte pi)
pi
- The profile specific information.public byte[] getReliabilityInformation()
public void setReliabilityInformation(byte b0, byte b1)
The
- reliability specific information.public int getParticipantID()
public void setParticipantID(int pid)
The
- participant ID.public long getSubcomponentID()
public void setSubcomponentID(long subID)
The
- subcomponent ID.public int getSequenceNumber()
public void setSequenceNumber(int nr)
nr
- The sequence number of the ADU this packet belongs to.public int getFragmentCount()
public void setFragmentCount(int fc)
public long getTimestamp()
public void setTimestamp(long ts)
The
- timestamp.public byte[] getPacketData()
public void setReliabilityHeader(byte[] header) throws IllegalValueException
header
- A reliability specific extension header that, when added
one byte for the header length field, must be a multiple
of four bytes in length.public void deleteReliabilityHeader()
public int getReliabilityHeaderLength()
public byte[] getReliabilityHeader()
public void parse() throws RtpiParseException
public void flush() throws RtpiFlushException
public int flushToArray(byte[] destination, int start) throws RtpiFlushException
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |