4 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
28 void reverse(char* x, int len)
32 for (i = 0; i < j; i++)
40 char* AcItoa(int n, char* str, int b)
45 str[i++] = "0123456789ABCDEF"[n%b];
56 return (('a' <= (ch) && (ch) <= 'z')? ((ch) - ('a'-'A')) : (ch));
59 char* SmsUtilUnpackGSMCode(char* szData, const char* pIn, int in_len )
65 /* If the number of fill bits != 0, then it would cause an additional shift */
74 for ( i = 0; i < in_len; i++, pos++ )
76 szData[i] = ( pIn[pos] << shift ) & 0x7F;
80 /* except the first byte, a character contains some bits
81 ** from the previous byte.
83 szData[i] |= pIn[pos-1] >> (8-shift);
92 /* a possible extra complete character is available */
94 szData[i] = pIn[pos] >> 1;
98 /* this is the end of the input, quit */
107 int SmsUtilPackGSMCode( unsigned char *pOut, const char* szData, int in_len )
114 // memset( out, 0, out_len_max );
116 /* pack the ASCII characters
123 for( pos = 0, i = 0; /*pos < out_len_max &&*/ i < in_len; pos++, i++ )
125 /* pack the low bits */
126 pOut[pos] = szData[i] >> shift;
128 if ( i + 1 < in_len )
130 /* pack the high bits using the low bits of the next character */
131 pOut[pos] |= szData[i+1] << ( 7 - shift );
148 void SmsUtilConvertBCD2Digit( char* pDigits, char* pBCD, int digitLen )
152 unsigned char higher, lower;
154 if ( pBCD == NULL || pDigits == NULL )
156 printf("__SmsConvertBCD2Digit: pBCD == NULL || pDigits == NULL. return.\n" );
162 //printf("__SmsConvertBCD2Digit: digitLen == 0. return.\n" );
170 bcdLen = digitLen / 2 + 1;
172 bcdLen = digitLen / 2;
174 memset( pDigits, 0, bcdLen * 2 );
176 for ( i = 0; i < bcdLen; i++ )
178 lower = pBCD[i] & 0x0F; // get low nibble
182 else if ( lower == 0x0B )
184 else if ( lower == 0x0C )
185 lower = 'p'; //DTMF Control pDigits seperator
186 else if ( lower == 0x0F )
190 AcItoa( lower, c, 16 );
191 lower = (char) AcToupper(c[0]);
194 higher = ( pBCD[i] >> 4 ) & 0x0F; // get high nibble
196 if ( higher == 0x0A )
197 higher = '*'; // =0x2A
198 else if ( higher == 0x0B )
199 higher = '#'; // =0x23
200 else if ( higher == 0x0C )
201 higher = 'p'; // =0x70, DTMF Control pDigits seperator
202 else if ( higher == 0x0F ) // if higher semi-octet is 0x0F, filled bits.
205 sprintf(pDigits + strlen(pDigits), "%c", lower);
206 pDigits[/*digitLen-1*/bcdLen*2-1] = '\0';
208 //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits );
214 AcItoa(higher, c, 16);
215 higher = (char) AcToupper(c[0]);
218 //sprintf(pDigits, "%s%c%c", pDigits, lower, higher);
219 sprintf(pDigits + strlen(pDigits), "%c%c", lower, higher);
222 pDigits[digitLen] = '\0';
224 //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits );
228 void SmsUtilConvertDigit2BCD( char* pBCD, char* pDigits, int digitLen )
232 unsigned char higher, lower;
234 if ( pBCD == NULL || pDigits == NULL )
237 // 0123456789 -> 1032547698
238 for ( i = 0, j = 0; i < digitLen; i = i + 2, j++ )
240 if ( pDigits[i] == '*' )
242 else if ( pDigits[i] == '#' )
244 else if ( AcToupper( pDigits[i] ) == 'P' )
247 digit = (int) ( pDigits[i] - '0' );
249 lower = digit & 0x0F;
251 if ( digitLen != i + 1 )
253 if ( pDigits[i+1] == '*' )
255 else if ( pDigits[i+1] == '#' )
257 else if ( AcToupper( pDigits[i+1] ) == 'P' )
260 digit = (int) ( pDigits[i+1] - '0' );
262 higher = digit & 0x0F;
269 pBCD[j] = ( higher << 4 ) | lower;
274 TmDateTime* SmsUtilDecodeTimeStamp(char * pTimeStamp, TmDateTime *tmDateTime )
276 //TmDateTime tmDateTime;
280 if ( pTimeStamp == NULL )
283 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[0], 2 );
284 tmDateTime->year = atoi( szBuf ) + 2000;
285 if ( ( tmDateTime->year >= 1900 + MAX_YEAR )/* && ( tmDateTime->year < 2000 + BASE_YEAR )*/ )
286 tmDateTime->year -= 100;
287 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[1], 2 );
288 tmDateTime->month = atoi( szBuf );
289 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[2], 2 );
290 tmDateTime->day = atoi( szBuf );
291 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[3], 2 );
292 tmDateTime->hour = atoi( szBuf );
293 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[4], 2 );
294 tmDateTime->minute = atoi( szBuf );
295 SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[5], 2 );
296 tmDateTime->second = atoi( szBuf );
298 if ( ( tmDateTime->year < 1900 + BASE_YEAR ) || ( tmDateTime->year > 1900 + MAX_YEAR ) )
299 tmDateTime->year = 1900 + BASE_YEAR;
302 time = TmDateTimeToSeconds( &tmDateTime );
303 if ( time > MAX_SECONDS )
311 unsigned char* SmsUtilEncodeTimeStamp( TmDateTime* tmDateTime, unsigned char* pTimeStamp )
313 //TmDateTime tmDateTime;
317 if ( pTimeStamp == NULL )
320 memset( (void*) pTimeStamp, 0x00, sizeof ( unsigned char ) * 7 );
322 //TmSecondsToDateTime( timeStamp, &tmDateTime );
324 year = tmDateTime->year - 2000;
327 sprintf( szBuf, "%02d", year );
328 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[0], szBuf, 2 );
329 sprintf( szBuf, "%02d", tmDateTime->month );
330 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[1], szBuf, 2 );
331 sprintf( szBuf, "%02d", tmDateTime->day );
332 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[2], szBuf, 2 );
333 sprintf( szBuf, "%02d", tmDateTime->hour );
334 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[3], szBuf, 2 );
335 sprintf( szBuf, "%02d", tmDateTime->minute );
336 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[4], szBuf, 2 );
337 sprintf( szBuf, "%02d", tmDateTime->second );
338 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[5], szBuf, 2 );
341 /* ignore Time zone (assume it is using 0x00 as default)
342 timeZone = TmGetTimeZoneOffset() /15;
344 absTimeZone = -timeZone;
346 absTimeZone = timeZone;
349 sprintf( szBuf, "%02d", 0);
350 SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[6], szBuf, 2 );
352 //if ( timeZone < 0 )
353 // pTimeStamp[6] |= 0x80;
360 int SmsUtilDecodeAddrField(char *diallingNum, char* pAddrField, int *result_ton, int *result_npi )
366 ton = ( pAddrField[local_index+1] & 0x70 ) >> 4;
367 npi = pAddrField[local_index+1] & 0x0F;
369 if ( ton != SMS_TON_ALPHA_NUMERIC )
371 // Origination/Destination address �ʵ忡���� length�� ���� address length
372 // origination/destination address �ʵ��� ��� length�� 0 �� ���� number type/plan �ʵ�� 0xFF ���� ���´�.
373 DialNumLen = pAddrField[local_index++];
377 DialNumLen = ( ( ( pAddrField[local_index++] + 1 ) / 2 ) * 8 ) / 7;
383 // SIM_SMSP_ADDRESS_LEN ���� address length �� ũ�� SIM_SMSP_ADDRESS_LEN ��Å�� ��ȯ�� �Ѵ�.
385 if ( DialNumLen > SMS_ADDRESS_LEN_MAX )
387 DialNumLen = SMS_ADDRESS_LEN_MAX;
390 printf(" DialNumLen = %d\n", DialNumLen );
392 local_index++; /* ignore Type of Address field */
394 if (ton != SMS_TON_ALPHA_NUMERIC )
396 SmsUtilConvertBCD2Digit( diallingNum, (char*) &pAddrField[local_index],DialNumLen );
400 SmsUtilUnpackGSMCode( diallingNum, &pAddrField[local_index],DialNumLen );
403 printf( "__SmsDecodeAddrField: diallingNum [%s].\n", (char*) diallingNum );
408 printf("ton %d npi %d\n",ton,npi);
415 int SmsUtilEncodeAddrField(unsigned char* pAddrField, char* diallingNum, int DialNumLen, int ton, int npi )
419 if ( diallingNum == NULL || pAddrField == NULL )
422 if ( diallingNum[0] == '+' )
426 ton = SMS_TON_INTERNATIONAL;
429 if ( ton != SMS_TON_ALPHA_NUMERIC )
431 // Origination/Destination address �ʵ忡���� length�� ���� address length
432 pAddrField[local_index++] = (unsigned char)DialNumLen;
433 //printf(" addr len packet: %d\n", pAddrField[local_index]);
437 pAddrField[local_index] = (unsigned char) ( ( ( DialNumLen * 7 + 7 ) / 8 ) * 2 );
439 // ������ ����Ʈ���� ���� 4��Ʈ�� ������ ������ length �ʵ尪�� -1�� �Ѵ�.
440 if ( ( ( DialNumLen * 7 ) % 8 ) <= 4 )
441 pAddrField[local_index]--;
443 printf(" addr len packet: %d out of SMS_TON_ALPAHA\n", pAddrField[local_index]);
448 SET_TON_NPI( pAddrField[local_index], ton, npi );
450 local_index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ����
452 if ( ton != SMS_TON_ALPHA_NUMERIC )
454 SmsUtilConvertDigit2BCD( (char*) &pAddrField[local_index], (char*) diallingNum, DialNumLen );
456 if ( DialNumLen % 2 )
457 local_index += DialNumLen / 2 + 1;
459 local_index += DialNumLen / 2;
463 local_index += SmsUtilPackGSMCode( &pAddrField[local_index], diallingNum, (int) DialNumLen );
468 int SmsUtilDecodeScAddrField( SmsAddressInfo_t* pSmsAddrField, unsigned char* pAddrField )
473 printf("SmsUtilDecodeScAddrField\n");
475 if ( pSmsAddrField == NULL || pAddrField == NULL )
477 printf( "SmsUtilDecodeScAddrField: pSimAddrField or pAddrField is NULL.\n" );
482 // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
483 // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
484 length = pAddrField[local_index];
485 // ������ ���� �޽����� ��쿡�� service center address�� ���� ���� �ִ�.
486 // �� ��쿡 length �� 0 �̸� number type, plan �� ��� ���
487 // length �� 1 �̸� type, plan �� �ִ� ���
490 pSmsAddrField->DialNumLen = ( pAddrField[local_index++] - 1 ) * 2; // -1�� TON/API �ʵ�
492 // SMS_SMSP_ADDRESS_LEN ���� address length �� ũ�� SMS_SMSP_ADDRESS_LEN ��Å�� ��ȯ�� �Ѵ�.
493 if ( pSmsAddrField->DialNumLen > SMS_ADDRESS_LEN_MAX )
495 pSmsAddrField->DialNumLen = SMS_ADDRESS_LEN_MAX;
498 pSmsAddrField->Ton = ( pAddrField[local_index] & 0x70 ) >> 4;
499 pSmsAddrField->Npi = pAddrField[local_index] & 0x0F;
501 local_index++; /* ignore Type of Address field */
503 SmsUtilConvertBCD2Digit( (char*) pSmsAddrField->DialNumLen, (char*) &pAddrField[local_index], pSmsAddrField->DialNumLen );
505 printf( "SmsUtilDecodeScAddrField: diallingNum [%s].\n", (char*) pSmsAddrField->DialNumLen );
507 printf( "length=%d , ton %d, npi =%d\n",pSmsAddrField->DialNumLen, pSmsAddrField->Ton,pSmsAddrField->Npi );
513 int SmsUtilEncodeScAddrField( unsigned char* pAddrField, SmsAddressInfo_t * pSmsAddrField )
517 if ( pSmsAddrField == NULL || pAddrField == NULL )
520 // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
521 // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
522 if ( pSmsAddrField->DialNumLen % 2 )
524 pAddrField[local_index++] = pSmsAddrField->DialNumLen / 2 + 1 + 1; // +1 �� TON/NPI �ʵ�, Ȧ������ ���� ������ ���߱� ���� �ѹ� �� +1
528 pAddrField[local_index++] = pSmsAddrField->DialNumLen / 2 + 1; // +1 �� TON/NPI �ʵ�
531 SET_TON_NPI( pAddrField[local_index], pSmsAddrField->Ton, pSmsAddrField->Npi );
533 local_index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ���׹߻�
535 SmsUtilConvertDigit2BCD( (char*) &pAddrField[local_index], (char*) pSmsAddrField->DialNumLen, pSmsAddrField->DialNumLen );
537 if ( pSmsAddrField->DialNumLen % 2 )
538 local_index += pSmsAddrField->DialNumLen / 2 + 1;
540 local_index += pSmsAddrField->DialNumLen / 2;
545 void SmsUtilDecodeDCS( Sms_coding_scheme* pCodingScheme, unsigned char dcs )
547 assert( pCodingScheme != NULL );
549 memset( pCodingScheme, 0, sizeof ( Sms_coding_scheme ) );
551 if ( dcs < 0x40 ) // bits 7..4 = 00xx : general data coding indication
553 pCodingScheme->coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
555 if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
556 pCodingScheme->bCompressed = TRUE;
558 if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits 1 to 0 have a message class meaning
560 pCodingScheme->bmsg_class_set = TRUE;
562 switch ( dcs & 0x03 ) // bits 1 to 0 : message class
565 pCodingScheme->class_type = SMS_CLASS_0;
568 pCodingScheme->class_type = SMS_CLASS_1;
571 pCodingScheme->class_type = SMS_CLASS_2;
574 pCodingScheme->class_type = SMS_CLASS_3;
578 dbg("Default case executed. Invalid option.");
582 else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
583 pCodingScheme->class_type = SMS_CLASS_NONE;
585 switch ( dcs & 0x0C ) // bits 4 to 3 : character set
588 pCodingScheme->alphabet_type = SMS_ALPHABET_DEFAULT;
591 pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
594 pCodingScheme->alphabet_type = SMS_ALPHABET_UCS2;
597 pCodingScheme->alphabet_type = SMS_ALPHABET_MAX;
601 dbg("Default case executed. Invalid option.");
605 else if ( dcs >= 0x40 && dcs < 0x80 ) // bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0 are coded exactly the same as group 00xx
607 pCodingScheme->coding_group_type = SMS_CODGRP_SM_AUTO_DELETION;
609 if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
610 pCodingScheme->bCompressed = TRUE;
612 if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits 1 to 0 have a message class meaning
614 pCodingScheme->bmsg_class_set = TRUE;
616 switch ( dcs & 0x03 ) // bits 1 to 0 : message class
619 pCodingScheme->class_type = SMS_CLASS_0;
622 pCodingScheme->class_type = SMS_CLASS_1;
625 pCodingScheme->class_type = SMS_CLASS_2;
628 pCodingScheme->class_type = SMS_CLASS_3;
632 dbg("Default case executed. Invalid option.");
636 else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
637 pCodingScheme->class_type = SMS_CLASS_NONE;
639 switch ( dcs & 0x0C ) // bits 4 to 3 : character set
642 pCodingScheme->alphabet_type = SMS_ALPHABET_DEFAULT;
645 pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
648 pCodingScheme->alphabet_type = SMS_ALPHABET_UCS2;
651 pCodingScheme->alphabet_type = SMS_ALPHABET_MAX;
655 dbg("Default case executed. Invalid option.");
659 // bits 7..4 = 1000 ~ 1011 : reserved
660 else if ( dcs == 0xC0 ) // bits 7..4 = 1100 : message waiting indication group, discard message
662 pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_DISCARD;
664 else if ( dcs < 0xE0 )
666 pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE;
669 pCodingScheme->bmsg_ind_active = TRUE;
671 switch ( dcs & 0x03 )
674 pCodingScheme->waiting_type = SMS_WAITING_VOICE_MSG;
677 pCodingScheme->waiting_type = SMS_WAITING_FAX_MSG;
680 pCodingScheme->waiting_type = SMS_WAITING_EMAIL_MSG;
683 pCodingScheme->waiting_type = SMS_WAITING_OTHER_MSG;
687 dbg("Default case executed. Invalid option.");
691 else if ( dcs < 0xF0 )
693 pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE_UCS2;
696 pCodingScheme->bmsg_ind_active = TRUE;
698 switch ( dcs & 0x03 )
701 pCodingScheme->waiting_type = SMS_WAITING_VOICE_MSG;
704 pCodingScheme->waiting_type = SMS_WAITING_FAX_MSG;
707 pCodingScheme->waiting_type = SMS_WAITING_EMAIL_MSG;
710 pCodingScheme->waiting_type = SMS_WAITING_OTHER_MSG;
714 dbg("Default case executed. Invalid option.");
720 pCodingScheme->coding_group_type = SMS_CODGRP_SM_CLASS_CODING;
723 pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
725 switch ( dcs & 0x03 )
728 pCodingScheme->class_type = SMS_CLASS_0;
731 pCodingScheme->class_type = SMS_CLASS_1;
734 pCodingScheme->class_type = SMS_CLASS_2;
737 pCodingScheme->class_type = SMS_CLASS_3;
741 dbg("Default case executed. Invalid option.");
747 void SmsUtilEncodeDCS( unsigned char* pDCS, Sms_coding_scheme* pCodingScheme )
749 unsigned char dcs = 0x00;
751 printf("SmsUtilEncodeDCS Start\n");
753 assert( pCodingScheme != NULL );
755 if( pCodingScheme->coding_group_type == SMS_CODGRP_SM_GENERAL_DCS ) // bit 7..4 is 00xx
757 if ( pCodingScheme->bCompressed )
758 dcs |= 0x20; // bit 5 is 1
760 if ( pCodingScheme->bmsg_class_set )
762 dcs |= 0x10; // bit 4 is 1
764 if( pCodingScheme->class_type== SMS_CLASS_0 )
767 else if ( pCodingScheme->class_type == SMS_CLASS_1 )
770 else if ( pCodingScheme->class_type == SMS_CLASS_2 )
773 else if ( pCodingScheme->class_type == SMS_CLASS_3 )
777 switch ( pCodingScheme->alphabet_type )
779 case SMS_ALPHABET_DEFAULT: // bit 3..2 is 00
784 case SMS_ALPHABET_8BIT: // bit 3..2 is 01
789 case SMS_ALPHABET_UCS2: // bit 3..2 is 10
794 default: // bit 3..2 is 11
801 else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_DISCARD ) // bit 7..4 is 1100
805 else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE ) // bit 7..4 is 1101
809 if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
812 else if( pCodingScheme->waiting_type == SMS_WAITING_VOICE_MSG)
815 else if( pCodingScheme->waiting_type == SMS_WAITING_FAX_MSG)
818 else if( pCodingScheme->waiting_type == SMS_WAITING_EMAIL_MSG) // bit 1..0 is 10
821 else if( pCodingScheme->waiting_type == SMS_WAITING_OTHER_MSG) // bit 1..0 is 11
825 else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE_UCS2 ) // bit 7..4 is 1110
829 if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
832 if( pCodingScheme->waiting_type == SMS_WAITING_VOICE_MSG ) // bit 1..0 is 00
835 else if( pCodingScheme->waiting_type == SMS_WAITING_FAX_MSG )
838 else if( pCodingScheme->waiting_type == SMS_WAITING_EMAIL_MSG )
841 else if( pCodingScheme->waiting_type == SMS_WAITING_OTHER_MSG )
844 else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_CLASS_CODING ) // bit 7..4 is 1111
848 if( pCodingScheme->alphabet_type == SMS_ALPHABET_DEFAULT ) // bit 2 is 0
850 else if( pCodingScheme->alphabet_type == SMS_ALPHABET_8BIT ) // bit 2 is 1
853 if( pCodingScheme->class_type == SMS_CLASS_0) // bit 1..0 is 00
856 else if( pCodingScheme->class_type == SMS_CLASS_1) // bit 1..0 is 01
859 else if( pCodingScheme->class_type == SMS_CLASS_2) // bit 1..0 is 10
862 else if( pCodingScheme->class_type == SMS_CLASS_3) // bit 1..0 is 11
866 memcpy( pDCS, &dcs, sizeof ( unsigned char ) );
868 printf("SmsUtilEncodeDCS End\n");
871 unsigned char SmsUtilEncodeValidity( unsigned char* pValidity, Sms_vp* pVP )
873 unsigned char pos = 0;
875 switch( pVP->vp_type )
877 case SMS_VP_NOT_USED:
880 case SMS_VP_RELATIVE:
881 pValidity[pos] = (unsigned char) pVP->vpValue;
885 case SMS_VP_ABSOLUTE:
887 //SmsUtilEncodeTimeStamp( pValidity, pVP->vpValue );
891 case SMS_VP_ENHANCED:
896 dbg("Default Case executed. Invalid Option.");