tpduSubmit [(short)(OTA_ADDRESS.length +
26 + location.length + soapAction.length)] =
(byte)(operationName.length);
for (i = 0 ; i < operationName.length ; i++) {
tpduSubmit [(short)(OTA_ADDRESS.length +
27
+ location.length + soapAction.length + i)] =
operationName [i];
}
short delta=(short)(OTA_ADDRESS.length +
27 + location.length
+ soapAction.length +
operationName.length);
// submit parameters
// parameter's name
tpduSubmit [delta]=(byte)zipcodeName.length;
delta++;
for (i = 0 ; i < zipcodeName.length ; i++) {
tpduSubmit [delta] = zipcodeName
[i];
delta++;
}
// parameter's type
tpduSubmit [delta]=(byte)zipcodeType.length;
delta++;
for (i = 0 ; i < zipcodeType.length ; i++) {
tpduSubmit [delta] = zipcodeType
[i];
delta++;
}
// parameter's value
tpduSubmit [delta]= (byte)zipcodeLength;
delta++;
for (i = 0 ; i < zipcodeLength ; i++) {
tpduSubmit [delta] = zipcode [i];
delta++;
}
ph.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte)0, DEV_ID_NETWORK);
ph.appendTLV(TAG_SMS_TPDU, tpduSubmit, (short)0,
(short)tpduSubmitLength);
ph.send();
}
break;
case EVENT_FORMATTED_SMS_PP_ENV:
EnvelopeHandler eh = EnvelopeHandler.getTheHandler();
eh.findTLV(TAG_SMS_TPDU, (byte)1);
tpudLengthOffset = eh.getTPUDLOffset();
userDataLength = (short)(eh.getValueByte(tpudLengthOffset)
- 19);
for (i=0; i<userDataLength; i++)
{
userData [i] =
eh.getValueByte((short)(tpudLengthOffset + i + 20));
}
ph.init(PRO_CMD_DISPLAY_TEXT, (byte)0x81,
DEV_ID_DISPLAY);
ph.appendTLV(TAG_TEXT_STRING,
(byte)0x04, userData, (short)0,(short)userDataLength);
ph.send();
break;
default:
break;
}
}
|