|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecthp.opencall.media.sms.tl.PDU
hp.opencall.media.sms.tl1.PDU
A protocol 1 PDU is a SMS TL (Short Message Service Transport Layer) byte array message sent or received thanks to a play or record operation on a relevant SMS Resource.
Each PDU is composed of one or severals Parameter
try{
SMSDeliverPDU pdu = new SMSDeliverPDU();
pdu.setTpMtiValue(TpMtiByteValue);
pdu.setTpMmsValue(TpMmsByteValue);
pdu.setTpRpValue(TpRpByteValue);
pdu.setTpUdhiValue(TpUdhiByteValue);
pdu.setTpSriValue(TpSriByteValue);
pdu.setTpOaValue(TpOaAssignedByteArray);
pdu.setTpPidValue(TpPidByteValue);
pdu.setTpDcsValue(TpDcsByteValue);
pdu.setTpSctsValue(TpSctsAssignedByteArray);
pdu.setTpUdlValue(TpUdlByteValue);
pdu.setTpUdValue(TpUdAssignedByteArray);
SMSDeliveryPDU pdu = new SMSDeliveryPDU();
// Encoding
encodedPdu = pdu.encodedPDU();
// dump (only during debug in order to avoid to alter performance)
System.out.println("sentPdu "+pdu);
SMSDeliverPDU receivedPdu = new SMSDeliverPDU();
receivedPdu.decodePDU(encodedPdu);
// dump (only during debug in order to avoid to alter performance)
System.out.println("receivedPdu "+receivedPdu);
byte _TpRpValue = receivedPdu.getTpRpValue();
byte[] _TpOaValue = receivedPdu.getTpOaValue();
...
} catch(Exception e){
// exception processing etc.
e.printStackTrace();
}
| Constructor Summary | |
PDU(String aName,
int aParameterNumber)
|
|
| Method Summary | |
void |
decodePDU(byte[] encodedPDU)
Decode a PDU and assigns all the involving Parameters This method should be used when receiving a SMS TL PDU and the Oclet need to get the Parameters values. |
byte[] |
encodedPDU()
Encode a PDU thanks to the previous Parameters assignment. |
| Methods inherited from class hp.opencall.media.sms.tl.PDU |
getSizeInByte, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PDU(String aName,
int aParameterNumber)
| Method Detail |
public byte[] encodedPDU()
throws PDUException
This method should be used to build a SMS TL PDU to be sent thanks to a play operation.
This method throws a PDUException if the encoding can be proceded completly.
encodedPDU in class PDUPDUException - if requested operation failsPlayer.play(java.lang.String[], int, hp.telephony.media.RTC[], java.util.Dictionary)
public void decodePDU(byte[] encodedPDU)
throws PDUException
This method should be used when receiving a SMS TL PDU and the Oclet need to get the Parameters values.
This method throws an DecodingException if the decoding can be proceded completly.
decodePDU in class PDUencodedPDU - is the encoded byte array PDU to decode.
PDUException - if requested operation failsRecorder.record(java.lang.String, hp.telephony.media.RTC[], java.util.Dictionary)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||