Home | History | Annotate | Download | only in map

Lines Matching defs:pdu

75         /* Members used for pdu decoding */
89 * Create a pdu instance based on the data generated on this device.
141 /* PDU parsing/modification functionality */
155 * @return the offset in number of bytes to the parameterID entry in the pdu data.
160 ByteArrayInputStream pdu = new ByteArrayInputStream(data);
165 pdu.skip(1); // Skip the message type
167 while (pdu.available() > 0) {
168 int currentId = pdu.read();
169 int currentLen = pdu.read();
176 pdu.skip(currentLen);
180 pdu.close();
194 ByteArrayInputStream pdu = new ByteArrayInputStream(data);
198 pdu.skip(offset);
201 while (pdu.available() > 0) {
202 int currentId = pdu.read();
203 int currentLen = pdu.read();
210 pdu.skip(currentLen);
214 pdu.close();
251 * just encoded using GSM encoding, or it is an actual GSM submit PDU embedded
266 * The TP-DA is two bytes within the PDU */
269 throw new IllegalArgumentException("wrongly formatted gsm submit PDU. offset = " + offset);
302 ByteArrayInputStream pdu = new ByteArrayInputStream(data);
304 pdu.skip(gsmSubmitGetTpUdlOffset());
305 int userDataLength = pdu.read();
307 int userDataHeaderLength = pdu.read();
314 pdu.read(udh);
380 * Change the GSM Submit Pdu data in this object to a deliver PDU:
381 * - Build the new header with deliver PDU type, originator and time stamp.
382 * - Extract encoding details from the submit PDU
384 * - Build the new PDU
386 * @param originator the phone number to include in the deliver PDU header. Any undesired characters,
391 ByteArrayOutputStream newPdu = new ByteArrayOutputStream(22); // 22 is the max length of the deliver pdu header
414 // Copy the pdu user data - keep in mind that the userDataLength is not the length in bytes for 7-bit encoding.
418 throw new IllegalArgumentException("Failed to change type to deliver PDU.");
468 * SMS PDU's as once generated to send the SMS message.
586 public static void testSendRawPdu(SmsPdu pdu){
587 if(pdu.getType() == SMS_TYPE_CDMA){
595 * The decoding only supports decoding the actual textual content of the PDU received
605 /* For GSM, there is no submit pdu decoder, and most parser utils are private, and only minded for submit pdus */
615 /* The format of a native GSM SMS is: <sc-address><pdu> where sc-address is:
619 throw new IllegalArgumentException("Length of address exeeds the length of the PDU data.");
634 SmsPdu pdu = new SmsPdu(gsmStripOffScAddress(data), SMS_TYPE_GSM);
636 int dataCodingScheme = pdu.gsmSubmitGetTpDcs();
709 /* TODO: This is NOT good design - to have the pdu class being depending on these two function calls.
710 * - move the encoding extraction into the pdu class */
711 pdu.setEncoding(encodingType);
712 pdu.gsmDecodeUserDataHeader();
723 messageBody = GsmAlphabet.gsm7BitPackedToString(pdu.getData(), pdu.getUserDataMsgOffset(),
724 pdu.getMsgSeptetCount(), pdu.getUserDataSeptetPadding(), pdu.getLanguageTable(),
725 pdu.getLanguageShiftTable());
731 messageBody = new String(pdu.getData(), pdu.getUserDataMsgOffset(), pdu.getUserDataMsgSize(), "utf-16");
736 messageBody = new String(pdu.getData(), pdu.getUserDataMsgOffset(), pdu.getUserDataMsgSize(), "KSC5601");