|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprotocol.ProtocolDataUnit
public abstract class ProtocolDataUnit
Represents a Protocol Data Unit (PDU).
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Octets: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +---------------+ |1| Source Call Number |0| Destination Call Number | 0 1 2 3 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +---------------+ | Time-Stamp | 4 5 6 7 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +---------------+ | Out Seq No | In Seq No |0| PDU Type | Sub Class | 8 9 10 11 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +---------------+ | | 12 ... : Payload : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Field Summary | |
---|---|
protected CallContext |
call
The call object |
protected int |
destinationCallNumber
The destination call number |
protected int |
inSeqNo
The inbound stream sequence number |
protected int |
outSeqNo
The outbound stream sequence number |
protected OctetBuffer |
payload
The payload data |
protected int |
pduSubclass
The subclass |
protected int |
pduType
The frame type |
protected int |
sourceCallNumber
The source call number |
protected java.lang.Long |
timeStamp
The time-stamp |
protected static int |
VOICE
PDU Type: Data Audio Compression Format Raw Voice Data |
Constructor Summary | |
---|---|
ProtocolDataUnit(CallContext call)
The constructor for outbound PDUs. |
|
ProtocolDataUnit(CallContext call,
byte[] pduOctets)
The constructor for inbound PDUs. |
Method Summary | |
---|---|
static ProtocolDataUnit |
create(CallContext call,
byte[] pduOctets)
Creates a new PDU of the correct type. |
(package private) void |
dump(java.lang.String prefix)
Logs this frame. |
(package private) long |
getTimestamp()
Returns the timestamp as long. |
protected void |
log(java.lang.String prefix)
Logs the time-stamp and the inbound/outbound stream sequence number. |
(package private) void |
onArrivedPDU()
Arrived is called when a packet arrives. |
void |
sendPayload(byte[] payload)
Sends a specified payload. |
(package private) void |
setTimestamp(long v)
Sets the time stamp as long. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int VOICE
protected CallContext call
protected OctetBuffer payload
protected java.lang.Long timeStamp
protected int sourceCallNumber
protected int destinationCallNumber
protected int outSeqNo
protected int inSeqNo
protected int pduType
protected int pduSubclass
Constructor Detail |
---|
public ProtocolDataUnit(CallContext call)
call
- The Call objectpublic ProtocolDataUnit(CallContext call, byte[] pduOctets)
call
- The Call objectpduOctets
- The incoming message bytesMethod Detail |
---|
void setTimestamp(long v)
long getTimestamp()
public static ProtocolDataUnit create(CallContext call, byte[] pduOctets)
call
- CallpduOctets
- byte[]
public void sendPayload(byte[] payload)
payload
- The payload datavoid onArrivedPDU()
protected void log(java.lang.String prefix)
prefix
- Text to includevoid dump(java.lang.String prefix)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |